String [][]myList = {{"cat", "dog", "mouse"},{"chair", "bench", "stool"}};
for (int i= 0; i < myList.length; i++)
{
for (int j= 0; j < myList.length; j++)
{
System.out.print(myList[i][j]);
}
}
< /code>
Das Problem, das ich habe, ist jedoch, dass das Array als Liste gedruckt wird, aber ich möchte, dass es druckt wie: < /p>
Cat chair
Dog bench
Mouse stool
Ich versuche das Array, das ich unten erstellt habe, auszudrucken.[code]String [][]myList = {{"cat", "dog", "mouse"},{"chair", "bench", "stool"}};
for (int i= 0; i < myList.length; i++) { for (int j= 0; j < myList.length; j++) { System.out.print(myList[i][j]); } } < /code> Das Problem, das ich habe, ist jedoch, dass das Array als Liste gedruckt wird, aber ich möchte, dass es druckt wie: < /p> Cat chair Dog bench Mouse stool [/code] Jede Hilfe wäre sehr geschätzt.
Die Methode Kombination sollte eine Kombination von Eingangsarrays erstellen. Und ich möchte diesen Kombinationsstrom in eine Datei speichern.
public void writeDot() {
try (PrintStream out = new...