Wrapper Class

A class that contains the primitive data types is known as a Wrapper class. It provides a way to use primitive data types as objects. An object is required to support synchronization in multi-threading, serialization and useful in the collection framework. Following are the eight wrapper classes given below –

Primitive data typeWrapper class
intInteger
charChar
byteByte
shortShort
longLong
floatFloat
doubleDouble
booleanBoolean

In this section, the below-mentioned topics we will be covered:

  • Autoboxing & Unboxing
  • Typecasting

Scroll to Top