Programming - Inheritance
You Are Here :: Home > JAVA > Inheritance - General Questions
37. |
What modifiers may be used with an inner class that is a member of an outer class?
|
A. |
a (non-local) inner class may be declared as public, protected, private, static, final or abstract. |
B.
|
a (non-local) inner class may not be declared as public, protected, private, static, final or abstract. |
C.
|
Can't Say
|
D.
|
None
|
|
Answer: Option A
Explanation:
|
38. |
How this() is used with constructors?
|
A. |
this() is used to invoke a constructor of the same class |
B.
|
this() is used to invoke a constructor of the different class |
C.
|
this() is used to invoke a constructor of the same variables
|
D.
|
this() is used to invoke a constructor of the same methods
|
|
Answer: Option A
Explanation:
|
39. |
How super() used with constructors?
|
A. |
super() is used to invoke a super class constructor |
B.
|
super() is used to invoke a child class constructor |
C.
|
Can't Say
|
D.
|
None
|
|
Answer: Option A
Explanation:
|
40. |
Which of the following statements correctly describes an interface?
|
A. |
It's a concrete class |
B.
|
It's a superclass |
C.
|
It's a type of abstract class
|
D.
|
|
|
Answer: Option D
Explanation:
|
« prev