How to check if the collection is thread safe?

Is there any way to check if this collection from java.util.collections is thread safe?

+4
source share
1 answer

Follow these steps:

  • Read the documentation (if they say so)
  • Check code if available (if code / methods are used)
  • Test it with a simple multithreaded program (do it in any way)
+4
source

Source: https://habr.com/ru/post/1606907/


All Articles