Datasheet

userNodeForPackage: User Preference Node: /<unnamed>
All information in node
fruit = apple
cost = 1.01
store = safeway
The exported information in the XML file is listed here:
<?xml version=”1.0” encoding=”UTF-8”?>
<!DOCTYPE preferences SYSTEM “http://java.sun.com/dtd/preferences.dtd”>
<preferences EXTERNAL_XML_VERSION=”1.0”>
<root type=”user”>
<map/>
<node name=”PreferenceExample”>
<map>
<entry key=”fruit” value=”apple”/>
<entry key=”cost” value=”1.01”/>
<entry key=”store” value=”safeway”/>
</map>
</node>
</root>
</preferences>
Summary
This chapter introduced Derby, a lightweight database from the Apache Database project, which is new
in JDK 6. Also reviewed were the new language features that Sun built into the JDK 5 release of the Java
programming language. You should have all you need to know to understand and utilize these new fea-
tures. You may find that a number of programming tasks you’ve accomplished in the past are now made
simpler and clearer, and perhaps even some problems that never had a good solution now do.
Also covered in this chapter are several of the most important utility libraries in Java. The preferences
library allows you to store and retrieve configuration information for your application. The logging
library provides a sophisticated package of routines to track what your program is doing and offer out-
put in a variety of ways. The regular expression library provides routines for advanced processing of
textual data.
Now that you have learned about the advanced language features in Java, the next two chapters take
you inside a modern Java development shop. In Chapter 2, the habits, tools, and methodologies that
make an effective Java developer are discussed.
77
Chapter 1: Key Java Language Features and Libraries
05_777106 ch01.qxp 11/28/06 10:43 PM Page 77