What is the main difference between class and interface?

Last Updated :
Discuss
Comments

What is the main difference between class and interface?


Class can’t have variables

Interface can be instantiated

Interface can’t have method bodies (pre Java 8)

Class has only abstract methods

Share your thoughts in the comments