title: Matching multiple keywords from a line in java
body: <p>I have a line from which multiple keywords are to be matched.  The whole keywords should be matched.</p>
  
  <p>Example,</p>
  
  <pre><code> String str = "This is an example text for matching countries like Australia India England";
  
   if(str.contains("Australia") ||
      str.contains("India") ||
      str.contains("England")){
      System.out.println("Matches");
   }else{
      System.out.println("Does not match");
   }
  </code></pre>
  
  <p>This code works fine.  But if there are too many keywords to be matched, the line grows.  <strong>Is there any elegant way of writing the same code?</strong>
  Thanks</p>