Chapter 8. Inheritance

Topics in This Chapter image

8.1 Extending a Class — page 85

8.2 Overriding Methods — page 86

8.3 Type Checks and Casts — page 87

8.4 Protected Fields and Methods — page 88

8.5 Superclass Construction — page 88

8.6 Overriding Fields — page 89

8.7 Anonymous Subclasses — page 91

8.8 Abstract Classes — page 91

8.9 Abstract Fields — page 91

8.10 Construction Order and Early Definitions image — page 92

8.11 The Scala Inheritance Hierarchy — page 94

8.12 Object Equality — page 95

Exercises — page 96

In this chapter, ...

Get Scala for the Impatient now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.