int () { int total = 0; final List ints = new ArrayList(); Iterator iterator = ints.iterator(); <warning descr="'while' loop can be replaced with enhanced 'for'">while</warning> ( iterator.hasNext()) { total += (Integer) iterator.next(); } iterator = ints.iterator(); // write use here return total; }