<<< The NumberFormat class | Index | The currency format example >>> |
Objects of the NumberFormat class are used for formatting real numbers (with decimal points)
The NumberFormat class has three static methods that can be used for formatting
real numbers,
currency, and
percent.
The format method returns a String for user-friendly display.
Objects of the NumberFormat class use a rounding technique called "half even" which can be used in most applications.
It is always best to format output of real numbers (BigDecimal, float or double) prior to displaying the numbers on the screen.
<<< The NumberFormat class | Index | The currency format example >>> |