java xor

Solutions on MaxInterview for java xor by the best coders in the world

showing results for - "java xor"
Marilou
25 Jan 2020
1boolean b1 = true;
2boolean b2 = true;
3if (b1 ^ b2) {
4  /*
5	Is called if exactly one of the two booleans is true
6  
7	Truth table:
8    0	0	|	0
9    0	1	|	1
10    1	0	|	1
11    1	1	|	0
12   
13	is basically the same as '!='
14  */	
15}