What’s the Output?
Determine the output of the following three code segments:
(a) int a = 3;
if (a++ == 3 )
System.out.println("Three");
else
System.out.println("Four");
(b) int a = 3;
if (++a == 3 )
System.out.println("Three");
else
System.out.println("Four");
(c) int a = 3; a = a++;
if (a == 3 )
System.out.println("Three");
else
System.out.println("Four");
We need at least 10 more requests to produce the solution.
0 / 10 have requested this problem solution
The more requests, the faster the answer.