What is Auto Boxing and Auto Unboxing ? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 10

What is Auto Boxing and Auto Unboxing ?

28th Dec 2016, 11:02 AM
Jenny Lance
Jenny Lance - avatar
3 Answers
+ 5
Autoboxing is the automatic conversion that the Javacompiler makes between the primitive types and their corresponding object wrapper classes. For example, converting an int to an Integer, a double to a Double, and so on. If the conversion goes the other way, this is called unboxing.
28th Dec 2016, 12:57 PM
Amit Selimi
Amit Selimi - avatar
+ 4
autoboxing is the conversion of primitive datatype to wrapper class object. auto-unboxing is the conversion of wrapper class object to primitive datatype.
28th Dec 2016, 5:23 PM
vikas
0
FYI: there ain't anything like auto-unboxing it's unboxing because you have to unbox explicitly
30th Dec 2016, 6:30 AM
Olushi Luqman Opemipo
Olushi Luqman Opemipo - avatar