Java Reference
In-Depth Information
lang
net
util
corresponding to the packages java.applet , java.awt , java.io , java.lang , java.net , and java.util
that are defined as part of the Java SE platform API.
Still continuing the example, if we were to look inside the directory util , we might see
the following files:
BitSet.java
Observable.java
BitSet.class
Observable.class
Date.java
Observer.java
Date.class
Observer.class
...
where each of the .java files contains the source for a compilation unit (§ 7.3 ) that con-
tains the definition of a class or interface whose binary compiled form is contained in
the corresponding .class file.
Under this simple organization of packages, an implementation of the Java SE plat-
form would transform a package name into a pathname by concatenating the compon-
ents of the package name, placing a file name separator (directory indicator) between
adjacent components.
For example, if this simple organization were used on an operating system where the
file name separator is / , the package name:
jag.scrabble.board
would be transformed into the directory name:
jag/scrabble/board
A package name component or class name might contain a character that cannot cor-
rectly appear in a host file system's ordinary directory name, such as a Unicode char-
acter on a system that allows only ASCII characters in file names. As a convention,
the character can be escaped by using, say, the @ character followed by four hexa-
decimal digits giving the numeric value of the character, as in the \u xxxx escape (§ 3.3 ) .
Under this convention, the package name:
children.activities.crafts.papierM\u00e2ch\u00e9
which can also be written using full Unicode as:
children.activities.crafts.papierMâché
Search WWH ::




Custom Search