63

hashMap与hashTable的区别-12212886-51CTO博客

 6 years ago
source link: http://blog.51cto.com/12222886/2068459
Go to the source link to view the article. You can view the picture content, updated content and better typesetting reading experience. If the link is broken, please click the button below to view the snapshot at that time.
    首先请先阅读这两个的源码。一、hashMap、hashTable都是Map接口的实现类,但是hashMap类继承自抽象类abstractMap类,hashTable继承自Dictionary类,该类在jdk中这样描述:可见该类已经过时。二、hashTable里面的方法都是同步的,实现同步的方法是synchronized,hashMap是非同步的,但也

About Joyk


Aggregate valuable and interesting links.
Joyk means Joy of geeK