You are confusing what "value" means. If you are dealing with objects, this means that any changes of the value of the reference are not reflected to the outside. A straightforward example that shows this behavior is be something like this:
public void foo() {
String s = "example";
String param = s;
bar(param);
assert s == param : "The value of parameter reference was not modified";
assert param.equals("example");
}
public void bar(String param) {
param = "something different";
}
Passing by value does, however, not mean that you cannot change the internal state of the object. This is perfectly possible and has consequences to the outside:
public void foo() {
List<String> l = Arrays.asList("example");
List<String> param = l;
bar(param);
assert s == param : "The value of parameter reference was not modified";
assert !param.get(0).equals("example") : "bar changed the internal state of the parameter";
assert !l.get(0).equals("example") : "bar changed the internal state of the list that is reference equal to the parameter";
}
public void bar(List<String> param) {
param.set(0, "something different");
}
Of course, such changes of the internal state of an object are reflected up all the way in the caller stack, which might lead to unforeseen side effects. This is the reason why the immutable object pattern was introduced. In the Java standard library, java.lang.Object and java.lang.String are examples for classes that implement this pattern. However, Java does not provide a language feature where where you can state that a class implements this pattern, so you must rely on JavaDoc and/or source code of the class to be sure an object is immutable.