<p>I personally like the <em>exclusive or</em>, <code>^</code>, operator when it makes sense in the context of boolean checks because of its conciseness.  I much prefer to write</p>

<pre><code>if (boolean1 ^ boolean2)
{
  //do it
}
</code></pre>

<p>than</p>

<pre><code>if((boolean1 &amp;&amp; !boolean2) || (boolean2 &amp;&amp; !boolean1))
{
  //do it
}
</code></pre>

<p>but I often get confused looks from other experienced Java developers (not just the newbies), and sometimes comments about how it should only be used for bitwise operations. </p>

<p>I'm curious as to the best practices regarding the usage of the <code>^</code> operator.</p>

You can simply use
```
!=
```
instead.