@Test
    public void testIte(){
        Collection<String> c = new HashSet<String>();
        c.add("java");
        c.add("php");
        c.add("cpp");
        c.add("c#");
        Iterator<String> it = c.iterator();
        while(it.hasNext()){
            String str = it.next();
            System.out.println(str);
        }
    }

 

posted on 2017-06-01 20:27  两枝梅  阅读(1313)  评论(0编辑  收藏  举报