Main Content

Class Hierarchies

Syntax and application of class hierarchies

Class hierarchies enable you to reuse functionality by factoring out commonalities into superclasses. Superclasses can define interfaces and can add specific traits to subclasses. Subclasses specialize data and functionality defined in the superclass.

Categories