Format public class Format extends Object implements Serializable , Cloneable Format is an abstract base class for formatting locale-sensitive information such as dates, messages, and numbers.
Any String formatted by format is guaranteed to be parseable by parseObject .
If formatting is unsuccessful because the Format object cannot format the type of object specified, format throws an IllegalArgumentException . In addition, some subclasses may also choose to implement other getXxxxInstance methods for more specialized control. For example, the NumberFormat class provides getPercentInstance and getCurrencyInstance methods for getting specialized number formatters. And finally subclasses may define a set of constants to identify the various fields in the formatted output. These constants are used to create a FieldPosition object which identifies what information is contained in the field and its position in the formatted result.