Java concurrency interview questions

6 points
Created by:

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?


Donate to Dirask
Our content is created by volunteers - like Wikipedia. If you think, the things we do are good, donate us. Thanks!
Join to our subscribers to be up to date with content, news and offers.

Java concurrency

Native Advertising
Get your tech brand or product in front of software developers.
For more information Contact us
Dirask - we help you to
solve coding problems.
Ask question.

❤️💻 🙂