Autoboxing and Unboxing

Java Data Types (Primitive and Non primitive / Reference), Java Variables (Local Variables, Instance Variables and Static or Class Variables), Explicit Declaration of Data Types & Variables, Purpose of Variables, Variable naming restrictions and Data Conversion.
Post Reply
Posts: 134
Joined: Fri Nov 23, 2018 2:52 am

Autoboxing and Unboxing

Post by swathi » Thu Dec 06, 2018 9:06 am

What is Autoboxing and Unboxing ?

Posts: 87
Joined: Fri Nov 23, 2018 5:29 am

Re: Autoboxing and Unboxing

Post by manoj » Thu Dec 06, 2018 9:07 am

Autoboxing: Converting a primitive value into an object of the corresponding wrapper class is called autoboxing.
For example, converting int to Integer class.

Unboxing: Converting an object of a wrapper type to its corresponding primitive value is called unboxing.
For example conversion of Integer to int.

Post Reply

Return to “Java Data Types & Variables”