/** * Create a new <code>Money</code> instance from the given amount using the default currency. * * @param amount the amount of money. */ public Money(double amount) { this(Currency.getDefaultCurrency(), amount); }
/** * Return a <code>String</code> representation of the given amount of money in the default * currency. * * @param value the value of the money * @return the string representation. */ public static String toString(double value) { NumberFormat format = Currency.getDefaultCurrency().getNumberFormat(); return format.format(value); }