Hallo, ich habe das Gefühl, ich habe ein Brett vor dem Kopf... Folgender Code will nicht funktionieren:
1 | package stringSplit; |
2 | |
3 | public class StringSplit { |
4 | String test = "Wenn:ich:grün:bin:fresse:ich:gras"; |
5 | String[] splitArray = test.split(":"); |
6 | |
7 | for(int i=0; i < splitArray.length ;i++){ |
8 | System.out.println(i + ": " + splitArray[i]); |
9 | }
|
10 | }
|
Fehler: illegal start of type > expected <identifier> expected