Programming - Inner Classes
You Are Here :: Home > JAVA > Inner Classes - Jdbc
7. |
The Keyword this can be used only from within ___________ code.
|
A. |
instance |
B.
|
static |
C.
|
non static
|
D.
|
final
|
|
Answer: Option A
Explanation:
The Keyword this can be used only from within instance code. |
|
8. |
The _________________ reference is a reference to the currently executing object.
|
A. |
this |
B.
|
final |
C.
|
super
|
D.
|
static
|
|
Answer: Option A
Explanation:
The this reference is a reference to the currently executing object. |
|
9. |
The ______________ reference is the way an object can pass a reference to itself to some other code.
|
A. |
this |
B.
|
final |
C.
|
super
|
D.
|
static
|
|
Answer: Option A
Explanation:
The this reference is a reference to the currently executing object.It is the way an object can pass a reference to itself to some other code. |
|
10. |
How many member modifiers are applied to inner classes?
|
|
Answer: Option D
Explanation:
1)Final 2)Abstract 3)Public 4)Private 5)Protected 6)Static 7)Strictfp |
|
11. |
A __________________ inner class can be instantiated only within the method where the inner class is defined.
|
A. |
method-local |
B.
|
method-final |
C.
|
method-global
|
D.
|
Staticmethod-local
|
|
Answer: Option A
Explanation:
A method-local inner class can be instantiated only within the method where the inner class is defined. |
|
12. |
The only modifiers you can apply to a method-local inner class are_________________________.
|
A. |
abstract |
B.
|
final |
C.
|
both A and B
|
D.
|
static
|
|
Answer: Option C
Explanation:
The only modifiers you can apply to a method-local inner class are Abstract and final. |
|
« prev
next »