-
If two threads access the same hashmap at the same time, what would happen?
-
- RuntimeException
- ClassNotFoundException
- NullPointerException
- ConcurrentModificationException
- None of these
Correct Option: D
The code will throw ConcurrentModificationException if two threads access the same hashmap at the same time.