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++;
}
Hi,
thanks to everyone for your very helpful comments.
I hadn't seen this kind of notation before but it appeared in a practice test.
Many thanks!!
Hi everyone,
I am preparing for a Java exam at the moment and I came across the following syntax and don't understand how to read it or what exactly it does:
i = (j>1)?2:1;
the whole code...