Java Reference
In-Depth Information
Chapter 25. Standard Packages
No unmet needs exist, and current unmet needs that are being met
will continue to be met.
Transportation Commission on Unmet Needs, California
The Java
™
2 Platform Standard Edition comes with many standard pack-
ages. These packages, all subpackages of the root
java
package, define
the main classes and interfaces for the platform. Throughout this topic
we have taught you about many of these classes, particularly those re-
lating to the core language and those most commonly used in general
programs. The main packages that we have covered are
•
java.lang
The main language classes, such as
Object
,
String
,
Thread
,
Class
, and so on. The subpackage
java.lang.annotation
defines some annotation types and was covered in
Chapter 15
.
The subpackage
java.lang.reflect
provides a way to examine
types in detail and was covered in
Chapter 16
.
The subpackage
java.lang.ref
defines the weak reference types that allow you to
influence garbage collection and was covered in
Chapter 17
.
•
java.io
Input and output and some file system manipulation. This
package was covered extensively in
Chapter 20
.
•
java.util
Classes of general utility. Defines the collection classes
both new and legacy that were covered in
Chapter 21
and the
localization classes covered in
Chapter 24
. Miscellaneous utilities
were covered in
Chapter 22
.
•
java.util.regex
Classes
for
regular
expressions.
These
were
covered in
Chapter 13
.
•
java.security
The platform security classes, which were briefly
described in
Chapter 23
. It contains a number of other classes
for encryption, authentication, digital signatures, and other useful
security-related code.