Given the code fragment:List<Person> pList = new CopyOnWriteArrayList<Person>();Which statement is true?
A. Read access to the List should be synchronized.
B. Write access to the List should be synchronized.
C. Person objects retrieved from the List are thread-safe.
D. A Person object retrieved from the List is copied when written to. E. Multiple threads can safely delete Person objects from the List.
Given the code fragment:List pList = new CopyOnWriteArrayList();Which statement is true?
-
- Site Admin
- Posts: 899558
- Joined: Mon Aug 02, 2021 8:13 am