Sorry für die Dumme Frage: Was ist an einer Schleife schwer ?777 hat gesagt.:Habs mit schleife gemacht.... dachte nur es geht aus Prinzip irgendwie leichter ...
for(String s : array) {
System.out.println(s);
}
System.out.println(Arrays.asList(array));
Und wie packt er sie da rein? Wahrscheinlich doch (falls keine atomaren Typen) durchdeathbyaclown hat gesagt.:und die elemente in einen StringBuilder zu packen....
setzt allerdings java v >= 1.5 vorausCode:for(String s : array) { System.out.println(s); }
for(int i = 0; i<array.length; i++) {
System.out.println(array[i]);
}
1.5 API hat gesagt.:Returns a string representation of the "deep contents" of the specified array. If the array contains other arrays as elements, the string representation contains their contents and so on. This method is designed for converting multidimensional arrays to strings.