Java package

This is an old revision of this page, as edited by 82.108.46.214 (talk) at 18:00, 5 January 2006 (Cleaned up (ahem re-written) following comments in the cleanup page). The present address (URL) is a permanent link to this revision, which may differ significantly from the current revision.

Related types in Java are placed in a common package.

  • A package provides a unique namespace for the types it contains.
  • A package facilitates access protection.
  • A package can contain the following kinds of types.

A package is represented in Java code by a series of textual names delimited by the '.' (dot) character. e.g import java.awt.event.*;

And is stored on disk {or in a compressed file such as a jar or Ear (Enterprise Archive)} as a series of nested directories. e.g. /java/awt/event