This question already has an answer here: Creating a ... The logical XOR operator does exist in Java ...
stackoverflow.com