![]() ![]() The only two legacy collections are thread-safe: Vector and Hashtable. ![]() ![]() Why are almost collection classes not thread-safe?Do you notice that all the basic collection classes - ArrayList, LinkedList, HashMap, HashSet, TreeMap, TreeSet, etc - all are not synchronized? In fact, all collection classes (except Vector and Hashtable) in the java.util package are not thread-safe. By reading to the end of this tutorial, you will be armed with deeper knowledge about the Java Collections Framework and I bet it will be definitely helpful for your daily Java coding. This Java tutorial helps you understand how the Java Collections Framework is designed for concurrency how we should use collections in single-threaded applications versus in multi-threaded ones.Topics about concurrency are often a little bit complicated and not easy to understand, so I will try my best to explain them as simple as possible. ![]()
0 Comments
Leave a Reply. |
AuthorWrite something about yourself. No need to be fancy, just an overview. ArchivesCategories |