Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

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