Programming - Wrapper Classes
You Are Here :: Home > JAVA > Wrapper Classes - General Questions
1. |
Wrapper class is a wrapper around a ________________________ data type.
|
A. |
Primitive |
B.
|
Non-Primitive |
C.
|
both a and b
|
D.
|
none of these
|
|
Answer: Option A
Explanation:
Wrapper class is a wrapper around a Primitive data type. |
|
2. |
wrapper classes were introduced in the _____________________________.
|
A. |
java.util.concurrent.atomicpackage |
B.
|
java.lang.concurrent.atomicpackage |
C.
|
java.io.concurrent.atomicpackage
|
D.
|
java.sql.concurrent.atomicpackage
|
|
Answer: Option A
Explanation:
wrapper classes were introduced in the java.util.concurrent.atomicpackage. |
|
3. |
The __________________ class does not contain constructors.
|
A. |
Wrapper Classes |
B.
|
Abstract Classes |
C.
|
Packages
|
D.
|
Interfaces
|
|
Answer: Option B
Explanation:
The Wrapper class does not contain constructors. |
|
4. |
Once a value is assigned to a ___________________ class instance it can not be changed
|
A. |
Wrapper |
B.
|
Abstract |
C.
|
Static
|
D.
|
Non-Static
|
|
Answer: Option A
Explanation:
Once a value is assigned to a wrapper class instance it can not be changed |
|
5. |
To retrieve an ArrayList object (that contains multiple elements) using the ________________ method.
|
A. |
init() |
B.
|
post() |
C.
|
get()
|
D.
|
stop()
|
|
Answer: Option C
Explanation:
To retrieve an ArrayList object (that contains multiple elements) using the get() method. |
|
6. |
To convert the Integer type object to a String object using the___________________________________ methods.
|
A. |
Integer.toBinaryString() |
B.
|
Integer.toHexString() |
C.
|
only A
|
D.
|
both A and B
|
|
Answer: Option D
Explanation:
To convert the Integer type object to a String object using the Integer.toBinaryString() and Integer.toHexString() methods. |
|
next »