The statement
x=(true) ? x++ : x--;
can be reduced to
x = x++;
The expression x++ will return the value of x which is zero. Before the assignment operation is complete the value of x is incremented. After the increment operation is complete the previous value of x, which was zero, is assigned to x.
The following code example demonstrates that the value of x is indeed incremented before the expression is completely evaluated.
The answer is b, "Prints: 1.0".
The statement contains an addition operation. The left operand is a postfix operation and it is evaluated first. The result of the postfix operation is zero, but variable i is incremented as a side effect. The right hand operand of the addition operation is the result of method m. As a side effect, method m prints the current value of variable i which is one. Method m then returns the value zero. The result of the addition operation is zero and that is the value that is assigned to variable i.