If I have an instance of an HashSet after I ran it through Collections.unmodifiableSet(), is it thread-safe?
I\'m asking this since Set documentation states that it\'s n
Yes, it is safe for concurrent read access. Here is the relevant sentence from the documentation:
If multiple threads access a hash set concurrently, and at least one of the threads modifies the set, it must be synchronized externally.
It states that you only need to synchronize if at least one
thread modifies it.