No call to change () affects the passed values due to automatic boxing / unpacking.
public void change(Integer a) {
a++;
}
The above code means that a ++ changes the value of a since it is an object, not a primitive. However, ++ is not overloaded by Integer, so it blocks it in order to be able to apply the ++ operator to its int. To me, the compiler should not allow this.
source
share