Although the Wrapper classes provide needed functionality, Java code is sometimes overly complicated due to the necessary conversions between the primitive and wrapper versions of data being manipulated. How can this be handled?
Although the Wrapper classes provide needed functionality, Java code is sometimes overly complicated due
Share
In Java, this is now handled automatically for you through a process known as Autoboxing.
Autoboxing occurs when the code requires a reference type but you have passed a primitive type. A common example is adding items to a collection.