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