[18 Feb 2020]Java Multithreading Concurrency
What is the difference between Process and Thread? What are the benefits of multi-threaded programming? What is difference between user Thread and daemon Thread? How can we create a Thread in Java? What are different states in lifecycle of Thread? Can we call run() method of a Thread class? How can we pause the execution of a Thread for specific time? What do you understand about Thread Priority? What is Thread Scheduler and Time Slicing? What is context-switching in multi-threading? How can we make sure main() is the last thread to finish in Java Program? How does thread communicate with each other? Why thread communication methods wait(), notify() and notifyAll() are in Object class? Why wait(), notify() and notifyAll() methods have to be called from synchronized method or block? Why Thread sleep() and yield() methods are static? How can we achieve thread safety in Java? What is volatile keyword in Java Which is more preferred – Synchronized method or Synchronized b...