Java: Interface vs. Abstract Class

Date Category dev Tags java

Interface

Features

  • Multiple inheritance
  • Does not provide any code
  • static final constants
  • A class implements an Interface
  • Usually describe peripheral abilities of a class

Example

An Automobile class can implement an Automatic interface.

When To Use

Usually when something in the design will change frequently, such as a file format ...

View comments.

more ...