DEV Community

Saravanan B
Saravanan B

Posted on

Core Java - Wrapper class.

Helps us to convert primitive types to object types.

It helps in collection class....

Primitive to object - boxing
object to primitive - Unboxing.
primitive to string
string to primitive
Object to string
string to object.

Primitive to object and Object to primitive.

Image description

Primitive to String and String to primitive.

Image description

String to object and Object to String.

Image description

Wrapper class also provide us with 2 convenient constructors.
That allow us to create an object with primitive and string.

Image description

Top comments (0)