Threads


  • What is thread? Why do you understand Multi threading?
  • Difference between multithreading and multitasking?
  • Difference between thread and a process?
  • Difference between green thread and native thread?
  • What are sleep() and wait methods? What is the difference between them?
  • How will you stop execution of a thread?
  • Why wait() and notify() are Object's class method?
  • How two threads can communicate?
  • Write code for Producer-Consumer problem?
  • Write code for blocking queue?
  • If we call directly the run() method, what will happen?
  • What start() method does?
  • There are three threads t1, t2, t3, how can I assure thread t2 starts only
  • when  t1 finished and t3 starts when t3 finishes?
  • What will happen If main thread dies before any other thread which is currently executing?
  • What is ThreadLocal?
  • What is Synchronization?
  • What is volatile?


No comments:

Post a Comment