Thread concept is the most important topic for all the interviews. This post contains most important interview questions on Thread concepts. The answers for these questions will be covered in further posts.
- What is a thread ? What are the ways we have in Java to create a thread ?
- Write a program to create a thread using Thread class or Runnable interface.
- Which is the default thread that runs in every java program internally ?
- What is the difference between extends Thread or implements Runnable ? Which one is more useful.
- What is thread deadlock? Describe it.
- Which methods are used in thread communication.
- How can you set priorities to a thread ? And, what is the default priority number of a thread ?
- What is a Thread Scheduler ?
- What is a Daemon Thread ?
- What id thread life cycle ? Explain.
- How can you improve communication between two threads?
- What is ThreadGroup ? What are the benefits of ThreadGroup ?
- What is the difference between Process and Thread ?
- What is the difference between notify() and notifyAll() methods ?
- Explain some of the methods in Thread class.
Filed under: JAVA Tagged: Creating thread using Thread class, Implementing Thread Using Runnable Interface, Java, Java Top Interview questions on Threads, Most important interview questions of Threas in Java, Thread Important questions in Java, Thread in Java