Java tutorial
import java.util.Currency; public class Main { public static void main(String args[]) { Currency curr1 = Currency.getInstance("USD"); Currency curr2 = Currency.getInstance("JPY"); System.out.println("USD fraction digits:" + curr1.getDefaultFractionDigits()); System.out.println("JPY fraction digits:" + curr2.getDefaultFractionDigits()); } }