Java Threads Question:
Download Questions PDF

What is the difference between Thread and Runnable types?

Answer:

A Java Thread controls the main path of execution in an application. When you invoke the Java Virtual Machine with the java command, it creates an implicit thread in which to execute the main method. The Thread class provides a mechanism for the first thread to start-up other threads to run in parallel with it.

Download Java Threads Interview Questions And Answers PDF

Previous QuestionNext Question
Why are there separate wait and sleep methods?How does the run() method in Runnable work?