Java Locale .setDefault ( Locale .Category category, Locale newLocale)

Syntax

Locale.setDefault(Locale.Category category, Locale newLocale) has the following syntax.

public static void setDefault(Locale.Category category,  Locale newLocale)

Example

In the following code shows how to use Locale.setDefault(Locale.Category category, Locale newLocale) method.


//from   w  ww .ja  va2  s  .  c  om
import java.util.Locale;

public class Main {

   public static void main(String[] args) {
      Locale.setDefault(Locale.Category.FORMAT,  Locale.getDefault());


   }
}