Java中的Iterable与Iterator详解转自 https://www.cnblogs.com/litexy/p/9744241.html
Java中的Iterable与Iterator详解在Java中,我们可以对List集合进行如下几种方式的遍历:List<Integer> list = new ArrayList<>();list.add(5);list.add(23);list.add(42);for (int i = 0; i < list.size(); i++) { System.out.print(list.get(i) + ",&q