@@ -0,0 +1,603 @@
+package com.hzh.corejava.datastructure;%0A%0Aimport java.util.ArrayList;%0Aimport java.util.Iterator;%0Aimport java.util.List;%0A%0A/**%0A * Created by huangzehai on 2017/5/9.%0A */%0Apublic class IteratorTest %7B%0A    public static void main(String%5B%5D args) %7B%0A        List%3CString%3E list = new ArrayList%3C%3E();%0A        list.add(%22hello%22);%0A        list.add(%22world%22);%0A        Iterator%3CString%3E it = list.iterator();%0A        while (it.hasNext()) %7B%0A            String value = it.next();%0A            if (%22hello%22.equals(value)) %7B%0A                it.remove();%0A            %7D%0A%0A        %7D%0A%0A       list.forEach(System.out::println);%0A%0A    %7D%0A%7D%0A

Add iterator example