DecimalFormatSymbols GetInstance1() Example
Gets the DecimalFormatSymbols instance for the specified locale.
DecimalFormatSymbolsclass GetInstance1() method example. This example shows you how to use GetInstance1() method.This method Gets the DecimalFormatSymbols instance for the specified locale.
Here is the code:-
/**
* @Program that Gets the DecimalFormatSymbols instance for the specified locale.
* GetInstance1.java
* Author:-RoseIndia Team
* Date:-14-Jun-2008
*/
import java.text.*;
import java.util.*;
public class GetInstance1 {
public static void main(String[] args) {
Locale l = new Locale("English");
DecimalFormatSymbols dfs = new DecimalFormatSymbols();
//Gets the DecimalFormatSymbols instance for the default locale
DecimalFormatSymbols dfs1 = dfs.getInstance(l);
System.out.println(" DecimalFormatSymbols instance for the specified locale is : "
+ dfs1.getInternationalCurrencySymbol());
}
} |
Output of the Program
| DecimalFormatSymbols instance for the specified locale is : XXX |
|