My question uses Java as an example, but I guess it applies to probably all.
Is there any practical difference between the XOR operator (^ in Java) and
^
With boolean values, there should be no difference. You should choose whichever is more appropriate for your sense of operation.
Example:
bool oldChoice = ...; bool newChoice = ...; if (oldChoice != newChoice) ...
Here XOR would give the same result, but will not reflect the real code intention.
XOR