HashTable和HashMap区别 ①继承不同. public class Hashtable extends Dictionary implements Map public class HashMap extends AbstractMap implements Map ② Hashtable 中的方法是同步的,而HashMap中的方法在缺省情况下是非同步的.在多线程并发的环境下,可以直接使用Hashtable,但是要使用HashMap的话就要自己增加同步处理了. ③ Hashtable
ArrayList和LinkedList的大致区别如下:1.ArrayList是实现了基于动态数组的数据结构,LinkedList基于链表的数据结构. 2.对于随机访问get和set,ArrayList觉得优于LinkedList,因为LinkedList要移动指针. 3.对于新增和删除操作add和remove,LinedList比较占优势,因为ArrayList要移动数据. 上代码: static final int N=50000; static long timeList(List lis