Qus:    What is boxing and unboxing?
Dec 11, 2020 15:13 2 Answers Views: 83 RAMU

 



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;

Prev Next
Answers (2)
PARTH Dec 12, 2020 02:58
Answer:   Converting a value type to a reference type is called called boxing and converting a reference type to a value type is called unboxing.

DIVYA Dec 12, 2020 08:25
Answer:   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;

Post Your Answer
Guest User

Not sure what course is right for you?

Choose the right course for you.
Get the help of our experts and find a course that best suits your needs.


Let`s Connect