Online Java Compiler By
JavaTpoint.com
import java.util.*; public class LocaleSetDefaultExample1 { public static void main(String[] args) { // set the default locale Locale.setDefault(new Locale("en", "US", "WIN")); // create a locale based on the default settings Locale locale1 = Locale.getDefault(); // print the new locale System.out.println("Locale1: " + locale1); } }
Output