posted 19 years ago
When you uncommment the System.out.println(i); statement, then this the one and only statement that gets executed because you did not put a boolean expression that tests for the end of the for loop! So the rest of the code is "unreachable" and that is what the compiler complains about.
Now, if you intended the whole code (after your uncommented statement) to excecute,then you had to enclose everything in {}:
[B]
Shorter code is
[/B]
(Edited to fix tags)
[ June 30, 2004: Message edited by: Barry Gaunt ]