Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- package insertion;
- import java.util.HashMap;
- import java.util.Locale;
- import java.util.Map;
- public class Test {
- public static void main(String[] args) {
- String[] countries = Locale.getISOCountries();
- Map localeMap = new HashMap<String, Locale>(countries.length);
- for (String country : countries) {
- Locale locale = new Locale("", country);
- localeMap.put(locale.getISO3Country().toUpperCase(), locale);
- }
- System.out.println(localeMap.get("LKA"));
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement