Question d’entretien chez General Motors (GM)

What is an interface in Java?

Réponse à la question d'entretien

Utilisateur anonyme

15 mars 2022

An interface in Java is a blueprint of a class. It has static constants and abstract methods. The interface in Java is a mechanism to achieve abstraction. There can be only abstract methods in the Java interface, not method body. It is used to achieve abstraction and multiple inheritance in Java.