set是无序的,需要遍历时(获取值),需要用迭代器iterator。没有get方法。 list是有序的,可以通过下标获取值。 map是成对的,可以用key获取值。 hashset是基于hashmap来实现的 相关文章: