Java Locale getDefault() methodThe getDefault() method of Java Locale class is used to get the current value of the default locale for this instance of the JVM(Java Virtual Mchine). SyntaxReturnIt returns the default locale for this instance of the Java Virtual Machine Example 1Test it NowOutput: Locale:en_US Example 2Test it NowOutput: Locale1: en_US Locale2: en_US
Next TopicJava Locale
|