Domanda di colloquio di CG Infinity

What is interface in java, and how it is different from abstract class?

Risposta di colloquio

Anonimo

1 lug 2020

An interface is a collection of abstract methods. We need to implement an interface in other non-abstract class, in order to define the methods present in the interface. It is different from an abstract class, because in an interface all methods are abstract, but in an abstract class, methods can be abstract or non-abstract