Hire QA – Specialized in QA Recruitment, Technical Interviews and Testing Solutions

Which collection classes are thread-safe?

Category: Java

Vector, Hashtable, Properties and Stack are synchronized classes, so they are thread-safe and can be used in multi-threaded environment. Java 1.5 Concurrent API included some collection classes that allows modification of collection while iteration because they work on the clone of the collection, so they are safe to use in multi-threaded environment.

Leave a Reply

Your email address will not be published. Required fields are marked *