Java Wrapper class is an inbuilt class whose object wraps or contains primitive data types. When we create the object to the wrapper class, it contains the field, and in this field, we can store primitive data types. In OOPs explanation we learned that object-oriented programming is all about objects and there are eight primitive data types (used as raw data for operations such as arithmetic, logical, etc.,), but they are not objects.
Wrapper class in Java is a class that contains and wraps the primitive data types (char, short, bytes, etc.). In other words, wrapper classes provide a way to use primitive data types (int, char, etc…) as objects. This wrapper class comes under java.util package. All the wrapper classes (Integer, Long, etc.) are subclasses of the abstract class Number.
#wrapper class #java #java.util #programming