title: Determine if a string contains a substring
body: <p>I wanna know how I can find if string A has string B in it without breaking apart the whole string; also finding how much times it repeats using loops. BTW, it doesn't have to be case-sensitive. For example:</p>
  
  <pre><code>public static void main(String[] args) {      
      String st = abababajjjabababb;
      String aba = null;
      String st2 = aba;
      int i = 0;
      char ch = st.charAt(i);
      int j;
      for (j = 0;j &lt; st2.length();j = j + 1){
          for (int k = 0; k &lt; st.length(); k = k + 1){
              if(ch == st.charAt(j)) {
                  break;
              }
          }
          if(j == st2.length()) {
  
          }
      }
      System.out.println("the letters in s1 dont repeat in s2");
  
  }
  </code></pre>
  
  <p>I know how to find if <code>st2</code> repeats in <code>st</code> but I don't know how to program it to tell me how many times it repeats.</p>
  
  <p>Thanks! I got my answer and I'm done with this program, thanks to you all that gave suggestions.</p>