title: Comparing chars in Java
body: <p>I want to check a char variable is one of 21 specific chars, what is the shortest way I can do this?</p>
  
  <p>For example:</p>
  
  <pre><code>if(symbol == ('A'|'B'|'C')){}
  </code></pre>
  
  <p>Doesn't seem to be working. Do I need to write it like:</p>
  
  <pre><code>if(symbol == 'A' || symbol == 'B' etc.)
  </code></pre>