Interview Question
Qus: What is boxing and unboxing?
Boxing is used convert value to reference type. For example
Int x =10
Object x = (object) x; //converting the integer to object type.
Object Myclass;
MyClass =87;
Int y = (Int )y;
Answers (2)
Int x =10
Object x = (object) x; //converting the integer to object type.
Object Myclass;
MyClass =87;
Int y = (Int )y;