public class Test1 {
public static void main(String[] args) {
int a = 3;
Integer a1 = new Integer(a);
Integer a2 = Integer.valueOf(a); // converting int into Integer
Integer a3 = a; //autoboxing, now compiler will write Integer.valueOf(a) internally
System.out.println(a1 instanceof Integer);
System.out.println(a2 instanceof Integer);
System.out.println(a3 instanceof Integer);
int a4 = a1.intValue(); // converting Integer to int
int a5 = a1; // unboxing, now compiler will write a.intValue() internally
}
}