Boxing and Unboxing

Last Modified On : 21-Aug-2004

public class Boxing
{
     public static void main(String args[])
     {
        int i=10, j = 20;
        Integer  iobj = i;   //boxing

         System.out.println(iobj);

         j = j + iobj;     // unboxing

         System.out.println(j);   

   
     }
}