The Sample program will test your understanding about the Locale Class in Java.
The Sample program will test your understanding about the Locale Class in Java.Given below the sample code :
1 import java.text.*;1. locale = new Locale("fr", "CA");
Locale.setDefault(locale);
2. df.setLocale(Locale.CA);
3. locale = new Locale("fr", "CA");
Locale.getDefault(locale);
4. locale = new Locale("fr", "CA");
Locale.getLocale(locale);
(1)