DEVFYI - Developer Resource - FYI

Describe the wrapper classes in Java.

Java Interview Questions and Answers (part 3)


(Continued from previous question...)

400. Describe the wrapper classes in Java.

Wrapper class is wrapper around a primitive data type. An instance of a wrapper class contains, or wraps, a primitive value of the corresponding type.

Following table lists the primitive types and the corresponding wrapper classes:

Primitive Wrapper
boolean java.lang.Boolean
byte java.lang.Byte
char java.lang.Character
double java.lang.Double
float java.lang.Float
int java.lang.Integer
long java.lang.Long
short java.lang.Short
void java.lang.Void

(Continued on next question...)

Other Interview Questions