Wrong output when searching with indexOf
<pre><code> int locsPlusLast = locsPlus.get(locsPlus.size()-1);
        System.out.println(locsPlusLast);
          int index = checkScanning.indexOf('(',locsPlusLast);
             while(index&gt;=0){
                   index = checkScanning.indexOf('(',locsPlusLast+1);
                 System.out.println(index);
         }
</code></pre>

<p>The <strong>checkScanning</strong> is scanner input.</p>

<p>I want only to output the position of (,but it outputs the postition of ) two , why is that ?</p>
