第十章習題

1.Collection、List、Set之間的聯繫和區別是什麼? Collection、List、Set均是接口,List、Set是Collection的子接口。List允許元素重複,Set不允許。 2.遍歷一個集合對象都有哪些方法? 遍歷接口主要有枚舉接口Enumeration和迭代器接口Iterator。進行遍歷時常用Iterator,Enumeration僅限於特定類,如Vector、Ha
相關文章
相關標籤/搜索