title: How to implement IN clause in Java
body: <p>Today I came across writing this code:</p>
  
  <pre><code>if("Name".equals(fieldName) || "ID".equals(fieldName) 
                   || "password".equals(fieldName) || "email".equals(fieldName)){
       //do something.
  }else{
       //for other 76 properties do something.
  }
  </code></pre>
  
  <p>I am comparing <strong><em>fieldName</em></strong> with four properties hence I have written four conditions. Is there a way in Java to combine all four conditions and write it as a single condition which satisfies my requirement. For instance</p>
  
  <pre><code>if(fieldName IN ("Name", "ID", "password", "email"){
      //do something. .
  }
  .
  .
  .
  </code></pre>
  
  <p>Are there any methods or workaround to achieve this?</p>