Locale.GERMANY : Locale « java.util « Java by API






Locale.GERMANY

 


/*Output: 
 * User's number (GERMANY): 1.976,083
 * */


import java.text.NumberFormat;
import java.util.Locale;

public class MainClass {
  public static void main(String args[]) throws Exception {
    NumberFormat numberFormat = NumberFormat.getInstance();
    numberFormat.setParseIntegerOnly(false);
    double usersNumber = 1976.0826;

    numberFormat = NumberFormat.getNumberInstance(Locale.GERMANY);
    System.out.println("User's number (GERMANY): " + numberFormat.format(usersNumber));
    
  }
}
           
         
  








Related examples in the same category

1.Locale.CANADA_FRENCH
2.Locale.ITALY
3.Locale.JAPAN
4.Locale.KOREA
5.Locale.TAIWAN
6.Locale.UK
7.Locale.US
8.new Locale(String language, String country, String variant)
9.Locale: getDefault()
10.Locale: getDisplayCountry()
11.Locale: getDisplayCountry(Locale inLocale)
12.Locale: getDisplayLanguage()
13.Locale: getDisplayName()
14.Locale: getDisplayName(Locale inLocale)
15.Locale: getDisplayVariant()
16.Locale: getDisplayVariant(Locale inLocale)
17.Locale: getISOCountries()
18.Locale.getISOLanguages()
19.Locale: setDefault(Locale newLocale)