Crack the Code: IT Interview Questions and Answers - Programming Language Institute

for, while, do while loop in Java


Question- What are wrapper classes in Java?

Answer- Wrapper classes convert the Java primitives into the reference types (objects). Every primitive data type has a class dedicated to it. These are known as wrapper classes because they “wrap” the primitive data type into an object of that class. Refer to the below image which displays different primitive type, wrapper class and constructor argument.