Chapter 9. Packages and Visibility

Packages and Visibility

In this chapter, we’ll look at the “how” and “why” of packages. Java uses the term package to mean a collection of related .class files in a directory. Speaking very strictly, packages and classes do not have to be directories and files. The Java Language Specification is written to allow implementations that store source code in a database or any other kind of repository, and some IDEs do that. However, “package ...

Get Just Java™ 2, Fifth Edition now with O’Reilly online learning.

O’Reilly members experience live online training, plus books, videos, and digital content from 200+ publishers.