# Inheritance Inheritance is useful to minimize code duplicates and generalize types in base classes. A Class can inherit all public and protected functions and fields from a base class and add its own or override existing ones. Private fields and functions still exist in the base class, but can't be acessed from the extending class. ## Examples - [Java](../java/inheritance/README.md) - [Rust](../rust/Inheritance.md) - [C++](../cpp/inheritance/README.md) - [JavaScript (using TypeScript)](../typescript/inheritance/README.md)