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[]) {

        // create a currency with eur code
        Currency curr = Currency.getInstance("EUR");

        // get currency code and print it
        String curCode = curr.getCurrencyCode();
        System.out.println("Currency Code is = " + curCode);
    }
}