title: Plase help me with writting this method
body: <p>/*I have write a method. User will a input like m/h/d. Then he will enter again different e.g. method. The output must be "Yes m/h/d occurs in method" */</p>
  
  <pre><code> public static boolean occursIn(String pattern, String str){
  
  for(int i=0; i&lt;= text.length()-1; i+=2){
  char a = pattern.charAt(i);
    if (text.contain(a)){
      return true;
    }
    else{
      return false;
    }
  
      }   
  }
  </code></pre>