Programming - Abstract Classes
You Are Here :: Home > JAVA > Abstract Classes - General Questions
13. |
Reference of an abstract class can point to objects of its sub-classes thereby achieving _________________ polymorphism
|
A. |
Compile-time |
B.
|
Run-time |
C.
|
Both
|
D.
|
None
|
|
Answer: Option B
Explanation:
Reference of an abstract class can point to objects of its sub-classes thereby achieving run-time polymorphism |
|
14. |
A _____________ must be compulsorily labeled abstract , if it has one or more abstract methods.
|
A. |
Class |
B.
|
Object |
C.
|
Variable
|
D.
|
Method
|
|
Answer: Option A
Explanation:
A class must be compulsorily labeled abstract , if it has one or more abstract methods. |
|
15. |
A ____________________ class may not be inherited
|
A. |
Implicit |
B.
|
Static |
C.
|
Non-Static
|
D.
|
Final
|
|
Answer: Option D
Explanation:
A final class may not be inherited |
|
16. |
A _____________________ variable becomes a constant and its value can not be changed.
|
A. |
Implicit |
B.
|
Static |
C.
|
Non-Static
|
D.
|
Final
|
|
Answer: Option D
Explanation:
A final variable becomes a constant and its value can not be changed. |
|
17. |
A __________________ method may not be overridden. This is done for security reasons and these methods are used for optimization.
|
A. |
Implicit |
B.
|
Static |
C.
|
Non-Static
|
D.
|
Final
|
|
Answer: Option D
Explanation:
A final method may not be overridden. This is done for security reasons and these methods are used for optimization. |
|
18. |
___________________ methods are used to provide a template for the classes that inherit the abstract methods.
|
A. |
Abstract |
B.
|
Static |
C.
|
Non-Static
|
D.
|
Explicit
|
|
Answer: Option A
Explanation:
Abstract methods are used to provide a template for the classes that inherit the abstract methods. |
|
« prev
next »