C# 中的集合类
C#的ArrayList是可伸缩的数组,里面存放Object,存取需要装箱拆箱,有性能损耗
List<>是ArrayList的等效类,实现了泛型,减小性能损耗
C#的HashTable同样是Object/Object 的键值对,有装箱拆箱,性能损耗
Dictionary<>是对应的实现泛型的等效类
C#中没有HashMap,它对应Dictionary<>
C#有HashSet<>实现泛型
Java中的集合类
Java中List和Map是接口名
其中AarrayList<>和HashMap<>是实现接口的类,此外实现上述接口的还有TreeList,TreeMap和LinkedList,LinkedHashMap
Java中有HashTable,相当于线程安全的HashMap
Java有HashSet<>,是通过适配器模式,内置HashMap实现的相应集合类