title: Any way to improve this String comparison with Java?
body: <pre><code>import java.util.ArrayList;
  import java.util.Arrays;
  import java.util.Collection;
  import java.util.List;
  
  
  
  public class NNNTest {
  private String SkillNeed="Java;C++;C";
  private String SkillHave="SQL:8;Java:9;C++:5;C:9;PHP:5";
  
  public boolean CheckAvailable(){
      int flag=0; 
      int k;
      String [] snar=SkillNeed.split(";");
      String [] shandlevel=SkillHave.split(";");
  
  
      for(int i=0;i&lt;snar.length;i++){
          for(k=0,flag=0;k&lt;shandlevel.length;k++){
              if(shandlevel[k].split(":")[0].equals(snar[i])){
                  System.out.println(shandlevel[k].split(":")[0]);
                  flag=1;
              }
          }
          if(flag==0){
              break;
          }
      }
      if(flag==1){
          System.out.println("YES");
          return true;
      }
      else{
          System.out.println("NO");
          return false;
      }
  
  }
  public static void main(String[] args) {
      NNNTest n=new NNNTest();
      n.CheckAvailable();
  
  
  }
  }
  </code></pre>
  
  <p>The method check if you have enough skills to acquire the job.</p>
  
  <p>SkillNeed is a String that with form  "skill;skill;skill....."</p>
  
  <p>SkillHave is the skills and level you have and with form  "skill:level;skill:level;...."</p>
  
  <p>These are the codes that I typed,but I think it's pretty long and boring,do you have any other way to improve the method?Something like skipping the loop or Array or using java given methods.</p>