3
Packages
•Group of related classes.
•Specified by package statement.
•Fewer restrictions on access among each other;
–if class is called public, then it is visible to all classes
–if no visibility modifier is specified, its visibility is termed as “package visibility” and is somewhere between:
•private (other classes in package cannot access it) and
•public (other classes outside package can also access it)
•Package locations can be specified by the CLASSPATH environmental variables.
•The import statement helps to get multiple packages. It saves typing.