Comprehension

Report a typo

Recreate the algorithm of adding a new element to the CopyOnWriteArrayList:

copyOnWriteArrayList.add("new element"); 
Put the items in the correct order
The original list becomes an updated copy.
The copy is updated with a new element.
The copy of the list is created.
Unlock.
The lock is set.
___

Create a free account to access the full topic