title: Check if a variable is equal to a list in java
body: <p>I want to check if the variable foo is equal to a list of values in <em>java</em></p>
  
  <pre><code>if( foo == "Cheese" || foo == "a" || foo == "3" ) {
      // ...
  }
  </code></pre>
  
  <p>I want to know how to do something like the following :</p>
  
  <pre><code>String[] values = {"Cheese", "a", "3"};
  if( foo in values ) {
      // ...
  }
  </code></pre>
  
  <p>Thank you for helping me !</p>