Since Autoboxing and Auto Unboxing are just compile-time functions. Try writing something like this in the source file, and then look at the decompiled code:
Integer i = 10;
Decompiled code:
Integer i = Integer.valueOf(10);
Similarly
int i = new Integer(100);
when decompiling you will get the following:
int i = (new Integer(100)).intValue();
Thus, the JVM still relies heavily on these methods at runtime, although it masquerades when writing code.
source
share