Well, the point is not how to make it better, as this was an exam question.
Seeing the answers now, I feel it's a bit unfair to ask that in a MC test. Ah well...thank you very much for the...
Type: Posts; User: meowCat
Well, the point is not how to make it better, as this was an exam question.
Seeing the answers now, I feel it's a bit unfair to ask that in a MC test. Ah well...thank you very much for the...
Hi,
thanks for your reply. I am still confused though.
the value of i before the confusing expression is 6.
So I would expect something then like
i += i
i = 6+6
=12
then the increment =13....
Hi everyone,
I have this bit of code and I am really confused about the result:
int i=5;
if (i++ == 5 || false){
System.out.println("before: "+i);
i += i++;
}