The following code
System.out.println(\"1 0 0: \" + (true ^ false ^ false));
System.out.println(\"1 0 1: \" + (true ^ false ^ true));
System.out.println(\"1 1 0:
Because true xor true = false, and false xor true is true. xor is associative, so group the values any way you please!
To decide that only one of them is true, you could add the values together as integers and see if the answer is 1.
I'm answering this as a general programming question, it really isn't particular to Java.