I wrote two loops, my problem is if the program execute the first loop then the second it works fine. However, when it finishes from the second loop first time then to goes back to the first loop it will not get into the second loop again. it will iterate inside the first loop until the end.
in the following is my code and the result I get:
try { int n=0; int I=0;
String line;
char c=0;
char [] arr1=new char[6];
while ((line = br.readLine()) != null ) {
if(n<1250) {
n++;
System.out.print("0"+n+"\n");
for(;c != ',';i++){
c=line.charAt(i);
arr1[i]=c;
System.out.print(arr1[i]);
jTextArea7.append(c+"");
}
}
}
}
result:
01 //result for the first loop
vhigh,02 //result for the next loop
03//goes back to the first loop (until here fine)
//but after this point I want the compiler to execute the second loop again, it stay //iterating within the first loop
04
05
06
07
08
09
010
011