Let's say i have the following scenario:
final int index = 10;
Phone phone = phoneList.get(index);
synchronized(phone)
{
//some code runs here
}
So while the the phone object (which is got throught phoneList.get() method) is locked can another thread execute the method:
phoneList.remove(index);
and null the phone object at the given index?