All Subjects
Light
AP Computer Science A
Class B is a Java class that extends another class (Class A) and contains its own methods and/or fields in addition to those inherited from Class A.
Inheritance: The ability for one class to extend another class, inheriting its methods and fields.
Overriding: When a subclass provides its own implementation of a method defined in its superclass.
Polymorphism: The ability of an object to take on many forms, allowing different classes to be used interchangeably.