Skip to main content

Command Palette

Search for a command to run...

. What do you mean by fail-fast and fast-safe? What is ConcurrentModificationException?

Published
1 min read
S

I love learning about technology and sharing that with others

ArrayList and CopyOnWriteArrayList

  1. fail-fast -> one thread is iterating and another thread modifies the arrayList that time ConcurrentModificationException will be thrown and it is fail-fast.

  2. fail-safe : CopyOnWriteArrayList -> there will be no exception as mentioned in above scenario

More from this blog

H

hashcodehub

271 posts

Consistent, Passionate and Organized :)