English

Define a wrapper class. - Computer Applications

Advertisements
Advertisements

Question

Define a wrapper class. 

Definition

Solution

The Java programming language uses wrapper classes included in the java.lang library package. The wrapper class includes a primitive data type. When creating an object from a wrapper class, a field in memory is allocated to store primitive data.

For example, 'Integer' is a wrapper class that includes the primitive data type 'int' and the following functions: 

Integer.parseInt() // to convert a String into integer data type 
Integer.toString() // to convert an integer data type to a String
shaalaa.com
  Is there an error in this question or solution?
Chapter 2: Library Classes - EXERCISES [Page 179]

APPEARS IN

Avichal Computer Applications [English] Class 10 ICSE
Chapter 2 Library Classes
EXERCISES | Q VII. 3. | Page 179
Share
Notifications

Englishहिंदीमराठी


      Forgot password?
Use app×