Indizierter Zugriff made in china: Code (Java): String cityAndZip = ""; for (int idx = 0; idx <= address.getMaxAddressLineIndex(); idx++) { if (idx == 0) { // street } else if (idx == 1) { cityAndZip = address.getAddressLine(idx); } else { break; } } return cityAndZip; Gefunden in einer Android-App. Auf sowas muss man erstmal kommen
String cityAndZip = ""; for (int idx = 0; idx <= address.getMaxAddressLineIndex(); idx++) { if (idx == 0) { // street } else if (idx == 1) { cityAndZip = address.getAddressLine(idx); } else { break; } } return cityAndZip;
Foren-Regeln