Here you can find the source of xOr(boolean x, boolean y)
public static boolean xOr(boolean x, boolean y)
//package com.java2s; //License from project: Open Source License public class Main { public static boolean xOr(boolean x, boolean y) { return ((x || y) && !(x && y)); }//w ww.jav a 2 s .com }