Please explain why int j doesnt get (j++) at first loop ?????
The program runs correctly i just dont understand why on first loop int j doesnt get j++
When i run debug i see the following steps.
Outer loop passes to inner loop and it prints first 8
then goes to line 4
comes back to line 1 ( at this point int i becomes 1, BUT int j DOESNT GET INCREASED BY 1 as i thought it should because of j++)
goes to line 3 again (prints 8 in a new row)
goes back to line 2 (ONLY NOW int j INCREASES BY 1)
for (int i = 0; i < 10; i++) {
for (int j = 0; j <= i; j++) {
System.out.print('8'); }
System.out.println(); }
}
}