Java Topics
Multithreading Interview Questions
Last Updated : 26 May, 2026
title: Multithreading Interview Questions
title: Multithreading Interview Questions description: Java Multithreading and Concurrency interview questions
Q1. Thread kya hai? Process se kya fark hai?
- Process — Independent program execution, alag memory space
- Thread — Process ka lightweight sub-unit, shared memory
Q2. Thread create karne ke tarike?
Threadclass extend karnaRunnableinterface implement karnaCallableinterface (return value + exception)ExecutorService(recommended)
Q3. Thread life cycle kya hai?
New → Runnable → Running → Blocked/Waiting → Terminated
Q4. synchronized keyword kya karta hai?
Ek time par sirf ek thread us method/block ko execute kar sakti hai. Race condition rokta hai.
Q5. wait(), notify(), notifyAll() kya hain?
wait()— Thread lock release karke wait karta hainotify()— Ek waiting thread ko wake up karta hainotifyAll()— Sabhi waiting threads ko wake up karta hai- Ye sirf synchronized block mein use hote hain
Q6. Deadlock kya hai? Kaise rokein?
Deadlock: Do threads ek-doosre ka lock wait kar rahe hain, dono stuck.
Rokne ke tarike:
- Lock order consistent rakho
tryLock()use karo- Timeout set karo
Q7. volatile keyword kya hai?
Variable ki value hamesha main memory se read hogi, cache se nahi. Visibility guarantee deta hai but atomicity nahi.
Q8. Thread.sleep() vs wait() difference?
| sleep() | wait() | |
|---|---|---|
| -- | -- | -- |
| Lock release | Nahi | Haan |
| Defined in | Thread class | Object class |
| Wake up | Time expire hone par | notify() se |
Q9. ExecutorService kya hai?
Thread pool manage karna aur tasks submit karna. Manually thread create karne se better.
ExecutorService es = Executors.newFixedThreadPool(5);
es.submit(() -> System.out.println("Task"));
es.shutdown();Q10. ThreadLocal kya hai?
Har thread apna alag variable copy maintain karta hai. Sharing nahi hoti.
Exam Focus
Revise definitions, diagrams, examples, and short-answer points for Multithreading Interview Questions.
Interview Use
Prepare one clear explanation, one practical example, and one common mistake for this Java topic.
Search Terms
java, java programming, core java, java master course, java notes, master, course, interview
Related Java Topics