OOPS
August 29, 2024
OOPS
August 29, 2024
OOPS
August 29, 2024
OOPS
August 29, 2024

OOPS

Question 143
Which of the following is true about interfaces in java?
1. An interface can contain following type of members.
…public,static,final fields(i.e., constants)
…default and static methods with bodies
2. An instance of interface can be created.
3. A class can implement multiple interfaces
4. many classes can implement the same interface
A
1,3 and 4
B
1,2 and 4
C
2,3 and 4
D
1,2,3 and 4
Question 143 Explanation: 
● The interface in java is a blueprint of a class. It has static constants and abstract methods.
● There can be only abstract methods in the Java interface, not method body.
● It cannot be instantiated just like the abstract class because there is no method definition available with the interface.
Correct Answer: A
Question 143 Explanation: 
● The interface in java is a blueprint of a class. It has static constants and abstract methods.
● There can be only abstract methods in the Java interface, not method body.
● It cannot be instantiated just like the abstract class because there is no method definition available with the interface.

Leave a Reply

Your email address will not be published. Required fields are marked *