Inheritance (extends) lets a child class reuse fields and methods from a parent class (Single, Multilevel, Hierarchical). Java does not support multiple inheritance with classes to avoid the "Diamond Problem"—use interfaces for that instead. Use super to call the parent constructor or overridden method.
ADVERTISEMENT