YOU saw an example of implementing an interface in the previous chapter. You can read more about interfaces here—what they are for, why you might want to write one, and how to write one.
This chapter also describes the way in which you can derive one class from another, that is, how a subclass can inherit fields and methods from a superclass. You will learn that all classes are derived from the
Object class, and how to modify the methods that a subclass inherits from superclasses. This chapter also covers interface-like abstract classes.
There are a number of situations in software engineering when it is important for disparate groups of programmers to agree to a “contract” that spells out how their ...