Thursday, September 26, 2019

Questions on Interface in Java

Questions on Interface in Java



Q) A java interface can contain ————

  1. public static Final Variables only
  2. public Abstract methods
  3. Abstract methods(unimplemented) and implemented methods both
  4. public static Final Variables and abstract methods both
Answer: D
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
Answer: c
Explanation: None.




No comments:

Post a Comment

Create a Digital Clock using HTML and JavaScript

Create a Digital Clock using HTML and JavaScript  <! DOCTYPE html> < html > < head > <...

Followers

Search This Blog

Popular Posts