मराठी

Autoboxing and Unboxing in Wrapper Classes

Advertisements

Topics

  • Autoboxing
  • Unboxing

Autoboxing:

1. Autoboxing 

The automatic conversion of a primitive data type into an object of its equivalent wrapper class is known as Autoboxing.  

Syntax: <Wrapper class> <object> = new <Wrapper class>(Primitive Value) 

Unboxing:

Unboxing is the opposite of autoboxing. It is a system for converting an object of a wrapper class into a primitive data type. 

Syntax: <Primitive Data Type> <variable> = <Wrapper object> 

If you would like to contribute notes or other learning material, please submit them using the button below.
Advertisements
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×