Formatting
This lesson describes how to format numbers, currencies,
dates, times, and text messages.
Because these data elements are visible by end-users,
their format must conform to various cultural conventions.
By following the examples in this lesson
you'll learn how to:
-
format data elements in a locale-sensitive manner
-
preserve the locale-independence of your code
-
avoid the need to write formatting routines for
specific locales
This section explains how to use the
NumberFormat, DecimalFormat,
and DecimalFormatSymbols classes.
In this section you'll learn about
the DateFormat, SimpleDateFormat,
and DateFormatSymbols classes.
This section shows how the MessageFormat
and ChoiceFormat classes can help you solve some of
the problems you might encounter when formatting text messages.