I have an error in this piece of code where I have declared public class variable mCountryCode as String.
for (mCountryCode : isoCountryCodes) {
locale = new Locale("", mCountryCode);
if(locale.getDisplayCountry().equals(mSpinner.getSelectedItem())) {
mCountryCode = locale.getCountry();
break;
}
}
If I use for (String mCountryCode : isoCountryCodes) instead then the error will go away but I am not able to sustain the mCountryCode string value after break; line.