autoboxing code example
Example 1: autoboxing and unboxing in java
Assigning a value of one type to a variable of another type is
known as Type Casting.
Auto-boxing; is a process when you take a primitive value and
assign into wrapper class object.
Un-boxing; is a process when you take Wrapper class object
and convert to primitive.
Example 2: Autoboxing
class Autoboxingexam{ public static void myNumber (Integer num){ system.out.println(num);}public static void main(String[]orgs){ myNumber(6); }}