CopyOnWriteArrayList

Let’s look into below example code. The only difference between these blocks is type of iteration. Example 1 uses Iterator and Example 2 uses for each loop. Running either of above example will result in below exception. So, what this exemption conveys us ? We are not allowed to modify the list during iteration. We […]

Java Interview Questions

1. Core Java CopyOnWriteArrayList Reflection API Threading Difference between Process and Thread Different ways to start a thread Thread lifecycle/states Runnable vs Callable Sleep vs Wait Wait vs Join Thread-Safe ExecuterService Difference between class lock and object lock? Best of Java Multithreading Interview Questions Collections Collection vs Collections Hashmap vs ConcurrentHashmap Set which maintains the […]