Cover page by Cay S. Horstmann

Stay ahead with the world's most comprehensive technology and business learning platform.

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, tutorials, and more.

Start Free Trial

No credit card required

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 ...

With Safari, you learn the way you learn best. Get unlimited access to videos, live online training, learning paths, books, interactive tutorials, and more.

Start Free Trial

No credit card required