Overview | Methods | This Package | All Packages
Formats a numeric value using currency formatting.
Syntax
public static String formatCurrency( double value )
public static String formatCurrency( double value, int decimalPlaces )
public static String formatCurrency( double value, int decimalPlaces, int options )
Parameters
value
The value to format.
decimalPlaces
The number of decimal places in the resulting string or -1 for the default number of decimal places.
options
A combination of zero or more flags from the NumberFormat enumeration.
Return Value
Returns the string containing the formatted currency value.
Remarks
The resulting string is formatted according to the currency format settings of the current locale. Use the formatting options to selectively enable or disable the leading digit on values less than 1, the parentheses around negative numbers, and the use of thousands separators.