Question 1
Which of the following is a wrapper class for int in Java?
Integer
Int
WrapperInt
Number
Question 2
What is autoboxing in Java?
Converting wrapper to primitive
Manually wrapping a primitive
Automatically converting primitive to wrapper
Compiling boxed objects
Question 3
Which of these is NOT a valid wrapper class in Java?
Integer
Float
Long
String
Question 4
What is the output of the following code?
Integer a = 100;
int b = a;
System.out.println(b);
0
100
Compilation error
Runtime exception
Question 5
What is unboxing in Java?
Wrapping primitive in object
Converting object to class
Converting wrapper to primitive
Boxing a class
Question 6
Which of the following is true about wrapper classes?
Wrapper classes allow primitives to be stored in collections
Wrapper classes slow down performance
Wrapper classes are used only in I/O
Wrapper classes are deprecated
There are 6 questions to complete.