1.

What is an Interface? How is it different from a class?

Answer»

An interface is just like Java Class, but it only has static constants and abstract method. Java uses Interface to implement multiple inheritances. 

An interface is syntactically similar to a class, but it lacks in field declaration and the methods inside an interface do not have any implementation. 

A class can be instantiated but an interface not.



Discussion

No Comment Found

Related InterviewSolutions