Programming - Inheritance
You Are Here :: Home > JAVA > Inheritance - General Questions
25. |
Which methods are used to destroy the objects created by the constructor methods?
|
A. |
finalize() |
B.
|
get() |
C.
|
final()
|
D.
|
post()
|
|
Answer: Option A
Explanation:
|
26. |
What are abstract classes?
|
A. |
Abstract classes are those for which instances can’t be created. |
B.
|
Abstract classes are those for which methods can’t be created. |
C.
|
Abstract classes are those for which variables can’t be created.
|
D.
|
Abstract classes are those for which classes can’t be created.
|
|
Answer: Option A
Explanation:
|
27. |
What must a class do to implement an interface?
|
A. |
It must provide all of the methods in the interface and identify the interface in its implements clause. |
B.
|
It must provide all of the variables in the interface and identify the interface in its implements clause. |
C.
|
It must provide all of the classes in the interface and identify the interface in its implements clause.
|
D.
|
It must provide all of the static variables in the interface and identify the interface in its implements clause.
|
|
Answer: Option A
Explanation:
|
28. |
Which methods in the Object class are declared as final?
|
A. |
getClass() |
B.
|
notify() |
C.
|
notifyAll(), and wait()
|
D.
|
All the Above
|
|
Answer: Option D
Explanation:
|
29. |
Final methods can be overridden.
|
A. |
FALSE |
B.
|
TRUE |
C.
|
Can't Say
|
D.
|
None
|
|
Answer: Option A
Explanation:
|
30. |
Declaration of methods as final results in faster execution of the program?
|
A. |
TRUE |
B.
|
FALSE |
C.
|
Can't Say
|
D.
|
None
|
|
Answer: Option A
Explanation:
|
« prev
next »