Locale belongs to the java. util. locale package.
Numberformat belongs to the java. Text. numberformat package.
Numberformat Java. text. numberformat. getcurrencyinstance (); numberformat Java. text. numberformat. getcurrencyinstance (Java. util. locale); string Java. util. numberformat. format (long); string Java. util. numberformat. format (INT); string Java. util. numberformat. format (double); string Java. util. numberformat. format (float );
The Quick Start is relatively simple.CodeExample
Import Java. text. numberformat; import Java. util. locale; public class test {public static void main (string [] ARGs) {localetest. print () ;}} class localetest {static public void print () {string countries [] = {"China", "Canada", "Korea", "Taiwan ", "France", "Italy", "Japan", "Germany", "us", "UK"}; locale Locale [] = {locale. china, locale. canada, locale. korea, locale. taiwan, locale. france, locale. italy, locale. japan, locale. germany, locale. us, locale. UK}; int Len = countries. length; For (INT I = 0; I