2
Reply

Different between Boxing and Unboxing?

Satheesh Kumar Pilli

Satheesh Kumar Pilli

Aug 20, 2014
1.1k
0

    In a simple word we can say that : Boxing is a process of converting the Value Type into Object Type Example :- Object obj;int a =125; obj=a; While UnBoxing is a process of retrieving the origional type(Value Type) from the Object Type. Example:- a=(int)obj;

    Praveen
    September 08, 2014
    0

    1. BoxingIf at all a value type is assigned to a refernce type variable we call it as "Boxing"Eg- int i=99; //varialbe initialization Object obj=i; //Assign variable to obj(i.e Boxing)2. UnboxingConverting reference type back into value type is known as "Unboxing"Eg- int j=(int)obj; //(unboxing)

    Satheesh Kumar Pilli
    August 20, 2014
    0