For Loop
for (int i = 0; i < 10; i++) {
System.out.print(i);
}
// Outputs: 0123456789
for (int i = 0,j = 0; i < 3; i++,j--) {
System.out.print(j + "|" + i + " ");
}
// Outputs: 0|0 -1|1 -2|2
Comments
for (int i = 0; i < 10; i++) {
System.out.print(i);
}
// Outputs: 0123456789
for (int i = 0,j = 0; i < 3; i++,j--) {
System.out.print(j + "|" + i + " ");
}
// Outputs: 0|0 -1|1 -2|2