You are previewing Scala for the Impatient.

Scala for the Impatient

Cover of Scala for the Impatient by Cay S. Horstmann Published by Addison-Wesley Professional
O'Reilly logo

Chapter 10. Traits

Topics in This Chapter image

10.1 Why No Multiple Inheritance? — page 111

10.2 Traits as Interfaces — page 113

10.3 Traits with Concrete Implementations — page 114

10.4 Objects with Traits — page 115

10.5 Layered Traits — page 116

10.6 Overriding Abstract Methods in Traits — page 117

10.7 Traits for Rich Interfaces — page 118

10.8 Concrete Fields in Traits — page 118

10.9 Abstract Fields in Traits — page 119

10.10 Trait Construction Order — page 120

10.11 Initializing Trait Fields — page 122

10.12 Traits Extending Classes — page 123

10.13 Self Types — page 124

10.14 What Happens under the Hood — page ...

The best content for your career. Discover unlimited learning on demand for around $1/day.