ICSE Class 10 Computer Applications Question 6 of 16

Library Classes — Question 6

Back to all questions
6
Question

Question 4

What is a wrapper class? Name three wrapper classes in Java.

Answer

A wrapper class allows us to convert a primitive data type into an object type. Each of Java's eight primitive data types­ has a wrapper class dedicated to it. These are known as wrapper classes because they wrap the primitive data type into an object of that class.

The three wrapper classes are Integer, Float and Double.