Inheritance is a very important feature of object-oriented programming (OOP). It is what makes code extensible in any OOP language. Extending a class is also called inheriting or subclassing. In Java, by default all classes are extendible, even though you can use the final keyword to prevent classes from being subclassed. This chapter explains all you need to know about inheritance in the Java programming language and provides some examples.