Java Multi-threading based interview Question and Answers

When ever you go for any interview there are of course some question based on java multi threading, You can find some of the important question related to threading and java.util.concurrent package .

  1. What is working of ConcurrentHashMap, What kind of  locking mechanism used in ConcurrentHashMap ?
  2. What is BlockingQueue and What is use of it ?
  3. How to provide ThreadSafety to Singleton class?
  4. What is volatile in java and where does it fails ?
  5. What is need of Callable Interface ?
  6. What is difference b/w synchronized block and synchronized method ?
  7. What is parallel process and how its different (or same) to concurrency ?
  8. What is difference bw CountDownLatch and CyclicBarrier ?
  9. If there are two synchronized methods, one is static and second is non-static (One is reading and other writing). Can both execute simultaneously.
  10. How to resolve the deal-lock in Java ?

You may also like

Leave a Reply

Your email address will not be published. Required fields are marked *