title: Implement nand only by = and !=
body: <p>I run this code:</p>
  
  <pre><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));
      }
  </code></pre>
  
  <p>and got this output :</p>
  
  <pre><code>false   false   false
  false   true    true
  true    false   true
  true    true    false
  </code></pre>
  
  <p><strong>UPDATE</strong>
  as you know nand truth-table is :</p>
  
  <pre><code>false   false   true
  false   true    true
  true    false   true
  true    true    false
  </code></pre>
  
  <p>how to return nand only using = or != operators without conditional || and &amp;&amp;?</p>