Multi-Threading Questions
Q- Explain the Life cycle of a Thread? Q- You have Thread T1, T2, and T3. How will you ensure that Thread T2 is run after T1 and T3 run after T2? Q- What is the difference between wait() and sleep() in Java? Q- Write a program that will result in DeadLock.How will you fix DeadLock in Java? Q- What is Thread Pool? How can we create Thread Pool in Java? Q- How to create Daemon Thread in Java? Q- What is ThreadGroup? Why it is advised not to use it? Q- What is the atomic operation? What are the atomic classes in Java Concurrency API? Q- In how many ways Threads can be created in Java? Q- Can we start a Thread twice? Q- Is there any relation between Threads like Parent-child? Q- How Exceptions are handles in case of MultiThreading scenario? Who will handle Exceptions if there is no handler? Q- What is the advantage of a new Lock interface over a synchronized block in Java? You need to implement a High-performance cache which allows multiple readers but a single writer to keep the inte...