title: Checking if a string contains any of the strings in an array
body: <p>Without for () loops such as</p>
  
  <pre><code> for(int j =0; j &lt; array.length; j++)
                  {
  }
  </code></pre>
  
  <p>I want to be able to check if a string contains any of the strings in an array <strong>globally.</strong> So for() loops don't work.</p>
  
  <p>I have tried</p>
  
  <pre><code>int arraylength;
  while(arraylength &lt; array.length()){
  arraylength++; }
  
  if(string.contains(array[arraylength]) {}
  </code></pre>
  
  <p>but this returns an error.</p>
  
  <p>edit:</p>
  
  <p>To clear it up:</p>
  
  <p>I want to do something like</p>
  
  <pre><code>if (string.contains(**code that checks all strings in an array**)
  </code></pre>
  
  <p>So I can check if string contains any of the strings in an array. As I have mentioned, for loops DO NOT work because I want to be able to execute the line of code above ANYWHERE in the class.</p>