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