Title: Key Concept - Abstract class and interface comparison
Course: CPS 189: Java Certification - Review, Practice & Prepare (Development) > Section: Learning Modules

Similarities:

Neither may be instantiated.

Differences:

An abstract class may contain fields that are neither static nor final.

An interface may only contain fields that are public, static, and final (constants).

An abstract class may contain concrete methods that are declared public, protected, or private.

An interface may only contain methods that are public or package-private and without implementations.

Only one class may be extended.

Multiple interfaces may be implemented.