Demonstrate Currency. : Currency « I18N « Java






Demonstrate Currency.

  
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());
  }
}

   
  








Related examples in the same category

1.Helper class for format number and currency