0
Is there an exclusive OR (XOR) in Java? Where it's one or the other but not both?
3 Respuestas
+ 3
No, but you can easily create one:
public static boolean logicalXOR(boolean x, boolean y) {
return ( ( x || y ) && ! ( x && y ) );
}
0
I don't think so
0
x XOR y in java: x^y