Is there an operator in Java that will give a result of false if either conditions are false, but if both are true or both false the result will be true?
I have some code that relies on a user entering some values for a process to run. As the user should only be able to enter x or y but not both or none I would like to show an error message in this case.