1/17
Looks like no tags are added yet.
* **Inheritance:
A mechanism where a subclass (child) acquires the fields and methods of a superclass (parent) using the `extends` keyword, letting you reuse code and build an "is-a" relationship.
* **Superclass (Base/Parent Class):
The general, top-level class that shares its common features with subclasses.
* **Subclass (Derived/Child Class):
The specialized class that inherits from a superclass and can add its own unique fields, methods, or overridden behaviors.
* **`extends` keyword:
The Java keyword used in a class declaration to establish the inheritance link between a subclass and its superclass.
* **Constructor Chaining:
When creating a subclass object, Java automatically triggers constructors up the entire inheritance chain (from child all the way to `Object`).
* **`super` keyword:
A keyword used inside a subclass to either invoke a superclass constructor (must be the very first line) or call a superclass method.
* **Method Overriding:
When a subclass provides its own custom implementation of a method already defined in its parent class, keeping the exact same method signature and return type.
* **Method Overloading:
Defining multiple methods with the exact same name but different parameter lists, either inside the same class or across related inheritance classes.
* **Object Class (`java.lang.Object`):
The ultimate root parent of every single class in Java; if a class doesn't specify an extension, it automatically inherits from `Object`.
* **`toString()` method:
A built-in method from the `Object` class that returns a string representation of an object, which should be overridden in your classes to show meaningful data instead of memory addresses.
* **Polymorphism:
The feature where a supertype variable can hold a subtype object (e.g., `Object x = new Student()`), allowing code to handle different object types uniformly.
* **Dynamic Binding:
At runtime, the JVM figures out which overridden method to execute by searching "bottom-up"—starting from the specific subclass and walking up the inheritance tree until it finds the implementation.
* **Generic Programming:
Writing methods with general parameter types (like `Object`) so they can accept and operate on any subclass object.
* **`instanceof` operator:
A safety check used to test whether an object reference actually points to an instance of a specific class before performing operations.
* **Implicit Casting:
Automatically converting a subtype reference into a supertype reference (moving *up* the tree), which is always safe because a child "is a" parent.
* **Explicit Casting:
Manually forcing a supertype reference down to a subclass reference using target parentheses (e.g., `(Student)o`), which is required when moving *down* the tree and can throw errors if mismatched.
* **`protected` modifier:
A visibility level that allows fields and methods to be accessed by any class in the same package or by subclasses anywhere in other packages.
* **`final` modifier:
A restriction tool that locks down code: a `final` class cannot be extended, a `final` method cannot be overridden, and a `final` variable becomes a constant.