Deep understanding of Java container classes

Java container classes include list, ArrayList, vector and map, hashtable, HashMap. ArrayList and HashMap are asynchronous, and vector and hashtable are synchronous. Therefore, vector and hashtable are thread safe, while ArrayList and HashMap are not thread safe. Because synchronization takes machine time, the execution efficiency of vector and hashtable is lower than that of ArrayList and HashMap. Collection ♪ list interface │♪ LinkedList linked list │♪ ArrayList sequential structure dynamic array class │ └ vector │ └ stack stack └ set map ♪ hashtable ♪ HashMap └ weakhashmap list interface

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>