Support for formatted output was introduced with JDK 1.1, in package java.text. There is a class called java.text.DecimalFormat for formatting numbers, and a class DateFormat for formatting dates and times. Other classes provide support for collation (sorting order), and formatting program messages to users.
Most people now will prefer to use the standard formatting used in C and printf, available from JDK 1.5 in class java.util.Formatter. Please refer to the Chapter 17 for a description of these features.
18.189.186.109