Boxing: Boxing is the process of converting value types to reference types
int x=10
Object obj=x; //Boxing
UnBoxing: Unboxing is the process of extract the values from objects
Object obj=x; //Boxing
int y=(int) obj; //Unboxing
int x=10
Object obj=x; //Boxing
UnBoxing: Unboxing is the process of extract the values from objects
Object obj=x; //Boxing
int y=(int) obj; //Unboxing
No comments:
Post a Comment