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 for euro
        Currency curr = Currency.getInstance("EUR");

        // get and print the symbol of the currency
        System.out.println("Currency symbol is = " + curr.getSymbol());
    }
}