Back to articles
JAVA INTERVIEW QUESTION REVISION

JAVA INTERVIEW QUESTION REVISION

via Dev.to BeginnersEr. Bhupendra

1 DIFF B/W INTERFACE AND ABSTRACT Feature Interface Abstract Class Purpose Defines a contract Provides partial abstraction + implementation Methods Mostly abstract methods (Java 8+: default & static allowed) Can have abstract + concrete methods Variables Only public static final (constants) Can have instance variables Constructor ❌ Not allowed ✅ Allowed Inheritance Class can implement multiple interfaces Class can extend only one abstract class Access Modifiers Methods are public by default Methods can have any access modifier Keyword used implements extends 2.

Continue reading on Dev.to Beginners

Opens in a new tab

Read Full Article
5 views

Related Articles