title: how to search for keywords in strings
body: <p>I need to do some keywords search and print if true.
  works fine if i am comparing in order. but i want to </p>
  
  <p>compare the following cases and expect them to be true.</p>
  
  <p>do some java programming = true</p>
  
  <p>some java = true</p>
  
  <p>do programming = true</p>
  
  <p>and finally most importantly</p>
  
  <p>programming java = true</p>
  
  <p>programming java some do = true</p>
  
  <p>I need to return true for all the cases mentioned above but so far it only works for case 1 and 2</p>
  
  <pre><code>public class Examples {
  
      public static void main(String[] args) {
          String[] given = new String[20];
          given[0]  = ("do some java programming");
          given[1] = ("do some grocery shopping");
          given[2] = ("play soccer at the west field");
          String input = new String();
          Scanner userInput = new Scanner(System.in);
  
          System.out.println("Enter the string to compare");
          input[0] = userInput.nextLine();
          for (int i=0; i &lt;20; i++){
          if(given[i].contains(input))
          {
              System.out.println(given[i]);
          }
          else
          {
              //do nothing
          }
          }
      }
  }
  </code></pre>