1.

If two threads access the same hashmap at the same time, what would happen?(a) ConcurrentModificationException(b) NullPointerException(c) ClassNotFoundException(d) RuntimeException

Answer» Right option is (a) ConcurrentModificationException

The best I can explain: The code will throw ConcurrentModificationException if two threads access the same hashmap at the same time.


Discussion

No Comment Found

Related InterviewSolutions