DecimalFormatSymbols SetInternationalCurrencySymbol() Example
Sets the ISO 4217 currency code of the currency of these DecimalFormatSymbols.
DecimalFormatSymbolsclass SetInternationalCurrencySymbol() method example. This example shows you how to use SetInternationalCurrencySymbol() method.This method Sets the ISO 4217 currency code of the currency of these DecimalFormatSymbols.
Here is the code:-
/**
* @Program that Sets the ISO 4217 currency code of the currency of these
* DecimalFormatSymbols.
* SetInternationalCurrencySymbol.java
* Author:-RoseIndia Team
* Date:-14-Jun-2008
*/
import java.text.*;
import java.util.*;
public class SetInternationalCurrencySymbol {
public static void main(String[] args) {
DecimalFormatSymbols dfs = new DecimalFormatSymbols();
String s=dfs.getInternationalCurrencySymbol();
System.out.println("ISO currency code of the currency is :"+s);
dfs.setInternationalCurrencySymbol("USD");
System.out.println("ISO currency code of the currency is :"+dfs.getInternationalCurrencySymbol());
}
} |
Output of the program:-
ISO currency code of the currency is :INR
ISO currency code of the currency is :USD |
|