Friends! Here is an example:
public class Test { public static void main(String[] args) { int i; int sum = 0; for (i = 1; i <= 5; sum += i++) { System.out.println("Сумма " + sum); } } } I went through debugging. I don’t understand why it is output from 0, and not 1, if sum + = i ++ is there, it should be 1? This is what is displayed.
Сумма 0 Сумма 1 Сумма 3 Сумма 6 Сумма 10 Please tell me thanks in advance!
