The second problem of internationalization is the task of
following local customs and conventions in areas such as date and time
defines classes to help with this duty.
formats numbers, monetary amounts, and percentages in a
locale-dependent way for display to the user. This is necessary
because different locales have different conventions for number
formatting. For example, in France, a comma is used as a decimal
separator instead of a period, as in many English-speaking countries.
NumberFormat object can use the
default locale or any locale you specify.
NumberFormat has factory methods for
obtaining instances that are suitable for different purposes, such as
displaying monetary quantities or percentages. In Java 1.4 and later,
java.util.Currency class can be
NumberFormat object so
that it can correctly print an appropriate currency symbol.
formats dates and times in a locale-dependent way for display to the
user. Different countries have different conventions. Should the month
or day be displayed first? Should periods or colons separate fields of
the time? What are the names of the months in the language of the
DateFormat object can
simply use the default locale, or it can use any locale you specify.
DateFormat class is used in
conjunction with the
Calendar classes of
TimeZone object tells the
DateFormat what time zone ...