img
System.out.println("String for StopText key: " +
rd.getString("StopText"));
System.out.println("String for StartText key: " +
rd.getString("StartText"));
// Load the German bundle.
rd = ResourceBundle.getBundle("SampleRB", Locale.GERMAN);
System.out.println("\nGerman version: ");
System.out.println("String for Title key : " +
rd.getString("title"));
System.out.println("String for StopText key: " +
rd.getString("StopText"));
System.out.println("String for StartText key: " +
rd.getString("StartText"));
}
}
The output from the program is shown here:
English version:
String for Title key : My Program
String for StopText key: Stop
String for StartText key: Start
German
version:
String
for Title key : Mein Programm
String
for StopText key: Anschlag
String
for StartText key: Anfang
Miscellaneous Utility Classes and Interfaces
In addition to the classes already discussed, java.util includes the following classes:
EventListenerProxy
Extends the EventListener class to allow additional parameters. See Chapter 22 for a
discussion of event listeners.
EventObject
The superclass for all event classes. Events are discussed in Chapter 22.
FormattableFlags
Defines formatting flags that are used with the Formattable inter face.
Proper tyPermission
Manages proper ty permissions.
Ser viceLoader
Provides a means of finding ser vice providers. (Added by Java SE 6.)
UUID
Encapsulates and manages Universally Unique Identifiers (UUIDs).
The following interfaces are also packaged in java.util:
EventListener
Indicates that a class is an event listener. Events are discussed in Chapter 22.
Formattable
Enables a class to provide custom formatting.
Search WWH :
Custom Search
Previous Page
Java SE 6 Topic Index
Next Page
Java SE 6 Bookmarks
Home