Create Currency from a Locale and get its symbol and Default Fraction Digits : Currency « I18N « Java Tutorial






import java.util.Currency;
import java.util.Locale;

class CurDemo {
  public static void main(String args[]) {
    Currency c = Currency.getInstance(Locale.US);

    System.out.println("Symbol: " + c.getSymbol());
    System.out.println("Default fractional digits: " + c.getDefaultFractionDigits());
  }
}








13.11.Currency
13.11.1.Load currecy locale, code and symbol to JTableLoad currecy locale, code and symbol to JTable
13.11.2.Create Currency from a Locale and get its symbol and Default Fraction Digits
13.11.3.Getting Currency Symbols for Locale.US
13.11.4.Getting Currency Symbols for Locale.UK
13.11.5.Getting Currency Symbols for Locale.FRANCE
13.11.6.Get currency symbol