Which of these keywords is used to define interfaces in Java?

Java MCQ: Which of these keywords is used to define interfaces in Java?

a) interface
b) intf
c) implement
d) None of the above

Answer:

a) interface

Explanation:

The interface keyword in Java is used to define an interface, which is a reference type that can contain only abstract methods, static methods, default methods, and constants.

Reference links:

https://www.rameshfadatare.com/learn-java-programming/
https://www.javaguides.net/p/java-tutorial-learn-java-programming.html

Leave a Comment

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

Scroll to Top