"Go" Java Collection class

Source: Internet
Author: User

http://blog.csdn.net/zhangerqing/article/details/8122075

http://android.blog.51cto.com/268543/400557/

http://blog.csdn.net/softwave/article/details/4166598

Http://www.blogjava.net/EvanLiu/archive/2007/11/12/159884.html

http://blog.csdn.net/zhangerqing/article/details/8193118

A:hashmap and Hashtable two classes implement the Map interface, both save K-v pair (Key-value pair) b:hashtable do not allow null values (key and value can not), hashmap allow null values ( Both key and value are available). The method of c:hashtable is synchronize, and HashMap is not, when multiple threads access Hashtable, they do not need to synchronize their methods, and HashMap must provide external synchronization. D: The iterator returned by the collection view method of all the HashMap classes is a quick failure: After the iterator is created, if the mappings are modified from the structure, except through the Remove method of the iterator itself, any other modification at any time, Iterators will throw concurrentmodificationexception. The main difference between Hashtable and HashMap is that the former is synchronous, and the latter is a fast failure mechanism.

"Go" Java Collection class

Related Article

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.