How can I iterate over a Set
/ HashSet
without the following?
(如何在没有以下内容的情况下迭代Set
/ HashSet
?)
Iterator iter = set.iterator();
while (iter.hasNext()) {
System.out.println(iter.next());
}
ask by user1621988 translate from so 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…