Java concurrency interview questions:
- How do you decide whether to use a CopyOnWriteArrayList or a Collections.synchronizedList(ArrayList)?
- When would you make a variable volatile?
- Explain volatile keyword
- synchronized vs ReentrantLock
- iterator can fails vs iterator won't fail
- How does thread synchronization occurs inside a monitor?
Java interview questions:
- Is Math.abs(Random.nextInt()) always positive?
- When might recursion cause stack overflows?
- What are the pros/cons of async vs. blocking I/O?
Java data structures interview questions:
- How do you decide whether to use a HashMap or a TreeMap?
Java algorithms interview questions:
- When would you use merge sort over quick sort?
- What unit tests would you write for Arrays.binarySearch?