Help the world stop coronavirus! Stay home!

Prev Next

Java / List and its implementations

Explain CopyOnWriteArrayList in Java collections.

CopyOnWriteArrayList implements List interface but its a thread-safe collection.

CopyOnWriteArrayList creates copy of underlying ArrayList with every mutation operation e.g. add or set. Normally CopyOnWriteArrayList is very expensive because it involves costly Array copy with every write operation but its very efficient if you have a List where Iteration outnumber mutation.

❤Cash Back At Stores you Love !!!❤

Earn your $10 reward when you make your first purchase through Ebates by signing up with clicking below button.

Ebates Coupons and Cash Back

More Related questions...

Show more question and Answers...

Map and its implementations

Comments & Discussions