+ 3
What is autoboxing and unboxing in java?
2 Réponses
+ 9
There are some wrapper classes like Integer, Float, Double and so on. Also you must be familiar with the primitive types like int, float, double which are frequently used. Autoboxing allows us to covert the primitive type into wrapper type without changing the value, and unboxing does the opposite.
You can refer the following code for example:
https://code.sololearn.com/cGGNeeHI2igq/?ref=app