How to create thread in Java

Posted on Updated on

A thread can be created by instantiating the object of type Thread.

There are two ways defined by which thread can be created.

  1. By implementing the Runnable interface
  2. By extending the Thread class

Read the rest of this entry »

Mutithreading- Thread class

Posted on Updated on

The multithreading system of java is built on thread class, its methods and runnable interface.

The execution of threads are encapsulated under Thread. In order to create a new thread, one can either extend the existing thread or implement the runnable interface.

The Thread class implements several class that should be used when working with thread. The methods are listed below Read the rest of this entry »

Concept of MultiThreading in Java

Posted on Updated on

Multithreading is multitasking, in which multiple parts of a program running concurrently. Each of those parts of programs are called thread and each thread defined different path of execution.
Unlike most other programming languages, Java provide built-in support for multithreaded programming.
When we’re discussing about multitasking, then we must discretely its two type-

  1. Process based
  2. Thread based

Read the rest of this entry »