Main.java Source code

Java tutorial

Introduction

Here is the source code for Main.java

Source

//package com.java2s;
import android.annotation.TargetApi;

import android.os.Build;

import java.util.Currency;
import java.util.Locale;

public class Main {
    @TargetApi(Build.VERSION_CODES.KITKAT)
    public static String[] get_Currency_Name_And_Currency_Code(String iso2) {
        String[] str = new String[2];
        Locale locale = new Locale("", iso2);
        Currency currency = Currency.getInstance(locale);
        str[0] = currency.getDisplayName(Locale.ENGLISH);
        str[1] = currency.toString();
        return str;

    }
}