a) Both are able to access the object
b) ConcurrentModificationException is thrown
c) One thread is able to access the object and second thread gets Null Pointer exception
d) One thread is able to access the object and second thread will wait till control is passed to the second one
When two threads access the same ArrayList object what is the outcome of the program?
-
answerhappygod
- Site Admin
- Posts: 899604
- Joined: Mon Aug 02, 2021 8:13 am
When two threads access the same ArrayList object what is the outcome of the program?
Join a community of subject matter experts. Register for FREE to view solutions, replies, and use search function. Request answer by replying!