ByteBrawl - Using With Interfaces - Abstract Classes - Inheritance

Abstract Classes - Using With Interfaces

An abstract class is a class that cannot be instantiated on its own and is meant to be subclassed. It can contain abstract methods (methods without a body) that must be implemented by subclasses, as well as concrete methods (methods with a body) that provide default behavior. Abstract classes are useful when you want to define a common interface and some shared functionality for a group of related classes.

Using With Interfaces

A class can only extend one other class. However, a class can implement multiple interfaces. If a class implements an interface AND extends a class, the extends keyword must come before implements, like so: