Not that I want to, but I'm wondering why the unary operators don't work directly on values in Java?
Why does result++;
work if int result = 0;
but result = 0++;
not work?
All I can find in the docs
is that the unary operator only requires one operand
, but there is no clear definition for an operand, and it seems that it can be either a variable or a value.