You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+15Lines changed: 15 additions & 0 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1354,4 +1354,19 @@ Creates an empty enum set with the specified element type.
1354
1354
1355
1355
<h1 align="center"> CopyOnWriteArraySet </h1>
1356
1356
1357
+
<ul>
1358
+
<li> <h3> To use this class, we need to import it from java.util.concurrent package. </h3> </li>
1359
+
<li> <h3> CopyOnWriteArraySet is a member of the Java Collections Framework. </h3> </li>
1360
+
<li> <h3> It is a Set that uses an internal CopyOnWriteArrayList for all of its operations. </h3> </li>
1361
+
<li> <h3> It was introduced in JDK 1.5, we can say that it is a thread-safe version of Set. </h3> </li>
1362
+
<li> <h3> That is Multiple Threads are able to perform update operations simultaneously but for every update operation, a separate cloned copy is created. </h3> </li>
1363
+
<li> <h3> While one thread iterating the Set, other threads can perform updation. </h3> </li>
1364
+
<li> <h3> Iterators returned are fail-safe. </h3> </li>
1365
+
<li> <h3> It is synchronized. </h3> </li>
1366
+
<li> <h3> An Iterator of CopyOnWriteArraySet class can perform only read-only and should not perform the deletion, otherwise, we will get Run-time exception UnsupportedOperationException. </h3> </li>
1367
+
<li> <h3> It is slower compared to HashSet since it is synchronized. </h3> </li>
0 commit comments