I often see code like:
Iterator i = list.iterator(); while(i.hasNext()) { ... }
but I write that (when Java 1.5 isn\'t available or for
if you're only going to use the iterator once and throw it away, the second form is preferred; otherwise you must use the first form