# | Line 32 | Line 32 | public final class IteratorLoops { | |
---|---|---|
32 | System.out.println(); | |
33 | ||
34 | Collection<Integer>[] colls = | |
35 | < | (Collection<Integer>[])new Collection[NC]; |
35 | > | (Collection<Integer>[])new Collection<?>[NC]; |
36 | ||
37 | for (int k = 0; k < colls.length; ++k) { | |
38 | Object x = klass.newInstance(); | |
# | Line 86 | Line 86 | public final class IteratorLoops { | |
86 | int counts() { | |
87 | int count = 0; | |
88 | for (int k = 0; k < cs.length; ++k) { | |
89 | < | for (Iterator it = cs[k].iterator(); it.hasNext();) { |
90 | < | if (it.next() != null) |
89 | > | for (Integer x : cs[k]) { |
90 | > | if (x != null) |
91 | ++count; | |
92 | } | |
93 | } |
– | Removed lines |
+ | Added lines |
< | Changed lines |
> | Changed lines |