title: comparing two string arrays to check if the entered value is there in the string array
body: <p>I have two string arrays</p>
  
  <pre><code>String[] Mids contains 
  MSI
  MSU
  MSV
  
  String[] sl contains
      MSU
      MSV
      MSS
  </code></pre>
  
  <p>Actual output should be</p>
  
  <pre><code>Action 
  Action 
  Action cannot be set
  
  for(int i=0;i&lt;sl.length;i++){
                  for(int j=0;j&lt;Mids.length;j++){
                      if((sl[i].equals(Mids[j]))){
                         System.out.println("Action");
                      }else{
                          System.out.println("Action cannot be set");
                      }
                  }
              }
  </code></pre>
  
  <p>OUTPUT  which i get</p>
  
  <pre><code>Action cannot be set
  Action cannot be set
  Action cannot be set
  Action cannot be set
  Action
  Action cannot be set
  Action
  Action cannot be set
  Action cannot be set
  </code></pre>