NumberFormat GetIntegerInstance1() Example
Returns an integer number format for the specified locale.
NumberFormatclass GetIntegerInstance1() method example. This example shows you how to use GetIntegerInstance1() method.This method Returns an integer number format for the specified locale.
Here is the code:-
/**
* @Program that Returns an integer number format for the specified locale.
* GetIntegerInstance1.java
* Author:-RoseIndia Team
* Date:-17-Jun-2008
*/
import java.text.*;
import java.util.*;
public class GetIntegerInstance1 {
public static void main(String[] args) {
//Creating Numberformat instance
NumberFormat nf = NumberFormat.getIntegerInstance(Locale.CHINA);
System.out.println("Integer number format for the specified locale. : "+nf.getCurrency());
}
} |
Output of the program:-
| Number format for the specified locale: CAD |
|