Skip to content

Commit f3c3279

Browse files
Update README.md
1 parent b0d447f commit f3c3279

File tree

1 file changed

+15
-0
lines changed

1 file changed

+15
-0
lines changed

README.md

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1354,4 +1354,19 @@ Creates an empty enum set with the specified element type.
13541354

13551355
<h1 align="center"> CopyOnWriteArraySet </h1>
13561356

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>
1368+
1369+
1370+
</ul>
1371+
13571372
<h1 align="center"> ConcurrentSkipListSet </h1>

0 commit comments

Comments
 (0)