Collection 实现 iterable List<Integer> l=new ArrayList<>(); l.add(1); l.add(2); ... for(int i:l) ... 等价于 Iterator it=l.iterator(); while(it.hasNext()){ it.next(); ... }
Sign in to make a reply
冰月冷望