Hallo,
ich sitze an meinem Programm (s.u.) und verzweifle... Es produziert eine Endlosschleife und ich finde den Knackpunkt nicht... Bitte helft mir schnell!!!
Vielen Dank im Voraus,
panisha
int[] txtzahlen = new int[max];
txtzahlen[0] = 0;
int i=1;
int n = 1;
int zeile;
int test;
while (i<=2){
Random r = new Random();
zeile = 1 + Math.abs(r.nextInt()) % max; System.out.println("Zeile: " + zeile);
System.out.println("txtzahlen[5]" + txtzahlen[5]);
int y=0;
while (y <=2) {
test = txtzahlen[y];
System.out.println("test" + test);
if (test == zeile) {
System.out.println("yes" + y);
break;
} else {
y = 0;
System.out.println("no" + y);
}
y=y+1;
}
i=i+1;
}