First, in the case of java, the term used is a reference to an object, not a "pointer". This basically means that its a logical reference to the actual object.
Further, as Lagerbaer already noted, its autoboxing-unboxing , which is transparent, which effectively increases the value, creates a new object, and then redirects it back to the link.
So, at the end of the increment operation, there are two objects instead of one.
The increment operation after unpacking will probably look something like this:
a = Integer.valueOf(a.intValue()++);
source share