I have the following code to display current locale
System.out.println(Locale.getDefault());
System.out.println(new Locale("en_US"));
The above gives output as follows
en_US
en_us
How do I construct a Locale instance which gives en_US
?
EDIT
I am asking this because my resources which is Messages_en_US.properties
is being ignored when I try to set it as default locale if any exception occurs during
ResourceBundle.getBundle("Messages", new Locale("en_US"));