Programming - Wrapper Classes
You Are Here :: Home > JAVA > Wrapper Classes - General Questions
7. |
_________________ is used to get the capacity of a list i.e. retrieving the number of objects contained in it.
|
A. |
size() |
B.
|
set() |
C.
|
stop()
|
D.
|
remove()
|
|
Answer: Option A
Explanation:
size() is used to get the capacity of a list i.e. retrieving the number of objects contained in it. |
|
8. |
______________________ is used to remove an object from a particular position specified by a index value.
|
A. |
size() |
B.
|
set() |
C.
|
stop()
|
D.
|
remove()
|
|
Answer: Option D
Explanation:
remove() is used to remove an object from a particular position specified by a index value. |
|
9. |
__________________ method is used to o replace an object from a particular position specified by a index value.
|
A. |
reset(int, object) |
B.
|
set(object,int) |
C.
|
set(int, object)
|
D.
|
reset(object,int)
|
|
Answer: Option C
Explanation:
set(int, object) method is used to o replace an object from a particular position specified by a index value. |
|
10. |
The wrapper classes are part of the ______________________ package
|
A. |
java.lang |
B.
|
java.util |
C.
|
java.io
|
D.
|
java.sql
|
|
Answer: Option A
Explanation:
The wrapper classes are part of the java.lang package |
|
11. |
The _________________ method is an instance method, because it is called through an instance of the class an Integer object.
|
A. |
FloatValue() |
B.
|
setValue() |
C.
|
resetValue()
|
D.
|
intValue()
|
|
Answer: Option D
Explanation:
The intValue() method is an instance method, because it is called through an instance of the class an Integer object. |
|
12. |
The ______________ class includes both instance methods and class methods.
|
A. |
Integer |
B.
|
String |
C.
|
inner
|
D.
|
abstract
|
|
Answer: Option A
Explanation:
The Integer class includes both instance methods and class methods. |
|
« prev
next »