Core Java Tutorials | UN Boxing using Java Wrapper classes

This Core Java Tutorials “Un boxing using Java Wrapper classes” post providing technical example that is used to convert Object to Primitive.


 

UN boxing:

  • Conversion of Object Byte to primitive byte.
  • We use non-static method of Byte class for this conversion.

 

Byte class pre-defined method for Un boxing:

 

  • In the following example first we prepare Byte object using boxing.
  • In the second step we are performing un boxing.

 

Share this