title: Removing element from ArrayList through Iterator
body: <p>I want to make a look up for entry in <code>ArrayList</code> and remove element if it's found, the simplest way I guess is through <code>Iterator</code>, here's my code:</p>
  
  <pre><code>    for (Iterator&lt;Student&gt; it = school.iterator(); it.hasNext();){
          if (it.equals(studentToCompare)){
              it.remove();
              return true;
          }
          System.out.println(it.toString());
          it.next();
      }
  </code></pre>
  
  <p>But something is wrong: instead of iterating through my <code>ArrayList&lt;Student&gt; school</code> I get using <code>it.toString()</code>:  </p>
  
  <pre><code>java.util.ArrayList$Itr@188e490
  java.util.ArrayList$Itr@188e490
  ...
  </code></pre>
  
  <p>What's wrong?</p>