Skip to main content

What is an interface and how is it different from an abstract class?

Entry Java
Quick Answer Interface: defines a contract (method signatures), no instance fields (only constants), a class can implement multiple interfaces, methods are public abstract by default (Java 8+ allows default and static methods). Abstract class: can have concrete methods and instance fields, single inheritance only, use when related classes share common implementation. Choose interface for capabilities, abstract class for shared base implementation.

Answer

Interface: Only abstract methods (older Java).
Abstract class: Can have concrete methods and fields.
Interfaces support multiple inheritance.
S
SugharaIQ Editorial Team Verified Answer

This answer has been peer-reviewed by industry experts holding senior engineering roles to ensure technical accuracy and relevance for modern interview standards.

Want to bookmark, take notes, or join discussions?

Sign in to access all features and personalize your learning experience.

Sign In Create Account

Source: SugharaIQ

Ready to level up? Start Practice