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 7. Packages and Imports

Topics in This Chapter image

7.1 Packages — page 74

7.2 Scope Rules — page 75

7.3 Chained Package Clauses — page 77

7.4 Top-of-File Notation — page 77

7.5 Package Objects — page 78

7.6 Package Visibility — page 78

7.7 Imports — page 79

7.8 Imports Can Be Anywhere — page 80

7.9 Renaming and Hiding Members — page 80

7.10 Implicit Imports — page 80

Exercises — page 81

In this chapter, you will learn how packages and import statements work in Scala. Both packages and imports are more regular than in Java; they are also a bit more flexible.

The key points of this chapter are:

• Packages nest just like ...

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