title: Getting all positions of an occuring String using StringBuilder.indexOf()
body: <p>Java Beginner over here.
  I'm currently working on a programm that searches a part of the human DNA.
  Specifically, I want to find all occurences of a String within a StingBuilder, using StringBuilder.indexOf(). But I need all occurences, not just the first.</p>
  
  <p>Code:</p>
  
  <pre><code>public void search(String motive){
      int count = 0;
      gene.indexOf(motive);   // gene is the Stringbuilder
      count++;
  
  
  }
  </code></pre>
  
  <p>I need all occurences of motive in the gene StringBuilder plus the counter how often motive is in gene.
  Any help, since indexOf() only displays the first occurence?</p>