void () { Iterator iter = new ArrayList().iterator(); while (iter.hasNext()) { Object o = iter.next(); if(o instanceof String) break; } while (iter.hasNext()) { // same iterator is used here Object o = iter.next(); } }