Wrapper Classes
Topics
Advertisements
CISCE: Class 10
Wrapper Class:
Note: Java uses wrapper classes from the java.lang package that contain primitive data types. Creating a wrapper class object allocates memory to store primitive data.
Need of Using Wrapper Classes
Note: Basically, wrapper classes contain primitive data values in terms of objects. The wrapper classes in Java serve two primary purposes: 1) To store primitive values in the objects. 2) To convert string data into other primitive types and vice versa.
