Questions on Interface in Java
Q) A java interface can contain ————
- public static Final Variables only
- public Abstract methods
- Abstract methods(unimplemented) and implemented methods both
- public static Final Variables and abstract methods both
Answer: D
An interface can have both final variables and abstract methods.
An interface can have both final variables and abstract methods.
Q ) Which of these can be used to fully abstract a class from its implementation?
a) Objects
b) Packages
c) Interfaces
b) Packages
c) Interfaces
Answer: c
Explanation: None.
Explanation: None.
No comments:
Post a Comment