-
for (i=0;i > 10;i++){
-
read = reader.nextDouble();
-
System.out.println(read);
-
}
-
Look at your code again; a for loop works like this:
-
for (<initialize>; <condition>; <increment>)
-
<statements>;
-
First the <initialize> section is executed once; then the <condition> is tested; if it has a true value then <statements> are executed and finally the <increment> part is executed. Then the <condition> is tested again and the cycle repeats as long as <condition> is true; otherwise the loop finishes.
Look at your <condition>: it isn't true the first time it is tested (0 < 10) so your loop terminated immediately. You probably wanted to write i < 10.
kind regards,
Jos