I have some questions about the XOR ^ operator in Java.
I always thought that Java does not have a logical XOR operator, because several people told me that ^ was beaten. Today I found some (unconfirmed) messages (without sources) in which ^ is overloaded in Java, working as a logical XOR for Boolean languages and as a bitwise XOR, for example. for integers.
Which statement is true? Can someone provide some reliable sources?
If ^ is overloaded, what types does it accept?
source
share