next up previous
Next: Automatic boxing and unboxing Up: Unit 04 Previous: Wrapper classes for the

Boxing and unboxing

To make use of the wrapper classes, we need to have means to convert a value of a primitive data type (such as int) to an ``equivalent'' value of the corresponding wrapper class (called boxing), and vice-versa (called unboxing).


next up previous
Next: Automatic boxing and unboxing Up: Unit 04 Previous: Wrapper classes for the