We love social media, but we do not expect you to create yet another public outpost on the Web.
One of hundreds of answers available with our premium content service.
A: In Java the Thread class represents a single independent path of execution in a Java Virtual Machine. When you run a Java program it implicitly starts a single thread of execution. The Thread class enables programmers to create additional threads and set them running. A number of threads may run in parallel, but only one is actively executed at a given moment.
The Java runtime system uses fairly complex thread scheduling mechanisms to coordinate the execution of threads, but this does not require privileged knowledge or detail level intervention by programmers. Programmers can manage the high level creation, initiation and distribution of tasks amongst threads through simple Application Programming Interface (API) methods.
The example below shows the simplest approach to thread creation and task execution; construct a new Thread with a Runnable argument and start it.
… full answer hidden
Premium members click below for full answer
What is a thread?