通过Iterator遍历set集合元素 遍历不出来
public void testIterator(){ Set<Course> set = new HashSet<Course>(); Iterator<Course> it = set.iterator(); System.out.println("通过Iterator遍历"); while(it.hasNext()){ // System.out.println(it.hasNext()); // System.out.println("....."); System.out.println(it.next()); } }