June 2004
Intermediate to advanced
848 pages
21h 28m
English
There are several keywords that control the visibility of a class or the members of a class. Access Modifiers on page 103 summarizes these modifiers (private, no keyword, protected, and public). Some of these access modifiers apply to packages, so we'll start with the “how and why” of Java packages.
When you're just writing a few programs for your personal use, you can put the classes in any old directory and use any old names. When you have a team of twenty programmers working on five different software products that interact, you need a better way to organize your files than “putting them in any old directory.”
Java uses the term package to mean a collection of related classes that form a library, and which ...
Read now
Unlock full access