E.g, we can:
Integer i = 2;
++i;
// now i = 3
We know that Integer is a raw wrapper type that's immutable like string, so ++i
actually will construct a new Integer object, right? So ++i
could be equal to i = Integer.valueOf(i.intValue() + 1)
Question:
If java doesn't support operator overloading of ++
like C++ language, then how "++i" is compiled and run? Is it just a form of syntax sugar?