The document consists of a series of questions related to multithreading concepts in Java, covering topics such as threads, processes, inter-thread communication, synchronization, and various methods like wait(), sleep(), and join(). It also addresses thread lifecycle, scheduling, deadlocks, and concurrency API components. Overall, it serves as a comprehensive guide for understanding multithreading in Java.
Download as TXT, PDF, TXT or read online on Scribd
0 ratings0% found this document useful (0 votes)
10 views
Multithreading
The document consists of a series of questions related to multithreading concepts in Java, covering topics such as threads, processes, inter-thread communication, synchronization, and various methods like wait(), sleep(), and join(). It also addresses thread lifecycle, scheduling, deadlocks, and concurrency API components. Overall, it serves as a comprehensive guide for understanding multithreading in Java.
Download as TXT, PDF, TXT or read online on Scribd
You are on page 1/ 1
1) What is multithreading?
2) What is the thread?
3) Differentiate between process and thread? 4) What do you understand by inter-thread communication? 5) What is the purpose of wait() method in Java? 6) Why must wait() method be called from the synchronized block? 7) What are the advantages of multithreading? 8) What are the states in the lifecycle of a Thread? 9) What is the difference between preemptive scheduling and time slicing? 10) What is context switching? 11) Differentiate between the Thread class and Runnable interface for creating a Thread? 12) What does join() method? 13) Describe the purpose and working of sleep() method. 14) What is the difference between wait() and sleep() method? 15) Is it possible to start a thread twice? 16) Can we call the run() method instead of start()? 17) What about the daemon threads? 18)Can we make the user thread as daemon thread if the thread is started? 19)What is shutdown hook? 20)When should we interrupt a thread? 21) What is the synchronization? 22) What is the purpose of the Synchronized block? 23)Can Java object be locked down for exclusive use by a given thread? 24) What is static synchronization? 25)What is the difference between notify() and notifyAll()? 26)What is the deadlock? 27) How to detect a deadlock condition? How can it be avoided? 28) What is Thread Scheduler in java? 29) Does each thread have its stack in multithreaded programming? 30) How is the safety of a thread achieved? 31) What is race-condition? 32) What is the volatile keyword in java? 33) What do you understand by thread pool? 34) What are the main components of concurrency API? 35) What is the Executor interface in Concurrency API in Java? 36) What is BlockingQueue? 37) How to implement producer-consumer problem by using BlockingQueue? 38) What is the difference between Java Callable interface and Runnable interface? 39) What is the Atomic action in Concurrency in Java? 40) What is lock interface in Concurrency API in Java? 41) Explain the ExecutorService Interface. 42) What is the difference between Synchronous programming and Asynchronous programming regarding a thread? 43) What do you understand by Callable and Future in Java? 44. What is the difference between ScheduledExecutorService and ExecutorService interface? 45) Define FutureTask class in Java?