ISO-3166 defines two-letter, three-letter and numeric standard abbreviations for each country. These are always written in upper case, e. g. Australia is AU, AUS or 036. The two letter country codes are also used asTLDs (Top Level Domains) TLD (Top Level Domain) s) in domain names, usually written in lower case, e.g.kangaroo. au. You can find out the country where the user is by interrogating the system propertyuser.country, e.g.

String country = System.getProperty("user.country");

String country = Locale.getDefault().getCountry();

You can override such system properties on the command line like this: