I run this code:

```
public static void main(String[] args) throws Exception {
        boolean a = false;
        boolean b = true;
        xor(a,a);
        xor(a,b);
        xor(b,a);
        xor(b,b);
    }

    public static void xor(boolean a , boolean b){
        System.out.println(a + "\t" + b + "\t" + (a != b));
    }

```

and got this output :

```
false   false   false
false   true    true
true    false   true
true    true    false

```

**UPDATE**
as you know nand truth-table is :

```
false   false   true
false   true    true
true    false   true
true    true    false

```

how to return nand only using = or != operators without conditional || and &&?