Was du machst ist folgendes:
Du legst 20 mal ein Array der Größe 1 an das name enthält.
Was du willst: ein Array der größe 20 anlegen, das die namen aus der Schleife enthält also:
Code:
String[] texte = new String[20];
for (int v = 0 ; v < 20 ; v++){
System.out.println("bitte namen eingeben;");
String name = (sysin.readLine());
texte[i]=name;
System.out.println(texte[i]);
}
Jak
____________________________________
Join the DNRC |
Godwin\'s Law (thx@stona)
Documentation is like sex: If it\'s good, it\'s very, very good. If it\'s bad, it\'s better than nothing.
\"In theory, theory and practice are the same. In practice, they are not\" (Lawrence Berra)