Different Java Classes

Published December 10th 2009 by
Filed under Java

In java, a class is a (possibly partial) implementation of a type. There are 3 different classes; concrete classes, abstract classes and interface classes. Concrete is a fully complete class, abstract is a semi-completed class and an interface is an incomplete class. An interface is fully abstract with no method implementation. The reason for an abstract class is because the implementation is too general at a high level.

Type: List of responsibilities (method headers)

Class: Type and implementation (instance variables and method bodies)

In java there is single implementation inheritance, but multiple interface inheritance i.e. you can only have one class listed after extends, but you can have a comma-separated list after interface.