Collection Basics
What is Collection
Why Collection ?
Collection API
Collection Hierarchy
What is List
What is ArrayList
What is LinkedList
What is Vector
method of vector class in java
What is Stack
List Advance
ArrayList user defined object
ArrayList internal implementation
LinkedList internal implementation
ArrayList VS LinkedList
ArrayList VS Vector
What is HashSet
What is LinkedHashSet
What is TreeSet
Set Advance
When to Use HashSet
HashSet internal Working
When to use LinkedHashSet
TreeSet internal Working
Set add method
Iterate Collection
Iterate Collection
Advance for loop
What is Iterator
Advantage of Iterator
What is ListIterator
Iterator VS ListLterator
What is Enumeration
Enumeration VS Iterator
What is HashMap
What is LinkedHashMap
What is TreeMap
What is Hashtable
What is WeakHashMap
What is IdentityHashMap
What is Properties file
Map Advance
What is Load-Factor
how to load properties file in java
how to iterate map in java
how to retrieve element of map using keySet
difference between hashmap and hashtable
Map Interview
Internal implementation of HashMap
HashMap Collision
Rehashing Process
Internal working of LinkedHashMap
What is Priority Queue
Concurrent Collections
Concurrent Collections
Concurrentmap in java
Why ConcurrentModificationException
What is ConcurrentHashMap
Internal Implementation of CHM
HashMap VS ConcurrentHashMap
What is CopyOnWriteArrayList
What is CopyOnWriteArraySet
Concurrent Map 2
Arraylist VS CopyOnWriteArrayList
put() VS putIfAbsent()
remove() method
replace() method
Collection Sorting
Comparable VS Comparator
Sort by multiple fields
Legacy class
Arrays class
What is Collections
Collection VS Collections
immutable object

what is concurrent collections in java

What is concurrent collections in java

As we know most of the collection classes are not thread-safe like ArrayList that is why java launched java.util.concurrent package includes a number of additions to the Java Collections Framework.

why concurrent collection came?

At the time of iterating any collection classes if another thread wants to modify collection data then we will get ConcurrentModificationException.But in case of new concurrent collection classes we can add element at the time iterating element without any exception.

What is problem with existing thread-safe collection classes

Performance wise existing thread-safe classes are not good because they  locks whole object instead of part of object.

Advantage of Concurrent Collection

  1. Every concurrent classes are thread-safe.
  2. Performance is far better than existing thread-safe classes.
  3. It has different locking mechanism.
  4. While iterating collection element we can modify data means we will not get ConcurrentModificationException.


Full-stack web and mobile app development company Contact Us : Skype: indore.webcoder Email: Sales: +91 8085506229