The fifth edition of this book covers Java 5.0. As its incremented version number attests, this new version of Java has a lot of new features. The three most significant new language features are generic types, enumerated types, and annotations, which are covered in a new chapter of their own. Experienced Java programmers who just want to learn about these new features can jump straight to Chapter 4.
Although each of these features is new in Java 5.0, none of them is large enough to merit a chapter of its own. Coverage of these features is integrated into Chapter 2.
java.utilcollections classes have been converted to be generic types, providing support for typesafe collections. This is covered in Chapter 4.
java.utilpackage also includes the new
Formatterclass. This class enables C-style formatted text output with
format( )methods. Examples are included in Chapter 5. The
java.util.Formatterentry in the quick reference includes a detailed table of formatting options.
The new package
java.util.concurrentincludes important utilities for threadsafe concurrent programming. Chapter 5 provides examples.
These packages support Java 5.0 annotations and the instrumentation, management, and monitoring of a running Java interpreter. Although their position in the
java.langhierarchy marks these packages as very important, they are not commonly used. Annotation examples are provided in Chapter 4, and a simple instrumentation and management example is found in Chapter 5.
New packages have been added to the
javax.xml.validationsupports document validation with schemas.
javax.xml.xpathsupports the XPath query language. And
javax.xml.namespaceprovides simple support for XML namespaces. Validation and XPath examples are in Chapter 5.
In a mostly futile attempt to make room for this new material,
I’ve had to make some cuts. I’ve
removed coverage of the packages
org.ietf.jgss from the quick reference.
standards have not caught on in core Java APIs and now appear to be
relevant only for Swing and related graphical APIs. As such, they are
no longer relevant in this book. The
java.security.acl package has been deprecated
since Java 1.2 and I’ve taken this opportunity to
remove it. And the
org.ietf.jgss package is of
interest to only a very narrow subset of readers.
Along with removing coverage of
the quick reference section, I’ve also cut the
chapter on JavaBeans from Part I of this book. The material on
JavaBeans naming conventions from that chapter remains useful,
however, and has been moved into Chapter 7.