/** Compile this program and dump the compiled bytecode
* with "javap -c" or equivalent; you will be enlightened
* as to the true nature of while loops compared to for loops.
*/
class LoopFor {
public static void main(String[] args) {
for (int i=0; i<10; i++) {
System.out.println(i);
}
}
}
|