Google interview question

What can happen if you modify a List in Java while iterating through it in another thread?

Interview Answers

Anonymous

2 Nov 2017

concurrentmodificationexception

Anonymous

25 Jan 2017

Didn't know the answer so I described what would happen if the Java standard library had not any protections. Actually, Java will throw an Exception. Explained a way Java can recognize the concurrent access and throw the exception. Interviewer explained how Java implements it actually.

3