Comparing string to other strings sequencially
<p>I want to be able to compare one string to all other strings sequentially and then move down to the next string and compare that strings to all the other strings below it.</p>

<p>Here is the code I have.  It compares the first string correctly and finds no matches.  However when the other for loop moves to the next value of i, everystring =1 and so does i so it compares itself.  How can I go about moving the inner for loop one value each time I go through the other loop?</p>

<pre><code>for (int everystring = 0; everystring &lt; children.length; everystring++) {

   String current = children[everystring].substring(0,
         children[everystring].indexOf("_"));

   for (int i = 1; i &lt; children.length; i++) {
      String innercurrent = children[i].substring(0,
            children[i].indexOf("_"));

      if (current.equalsIgnoreCase(innercurrent)) {

         System.out.println("Match");
      } else
         System.out.println("No Match");
   }
   System.out.println();
}
</code></pre>
