C C++ Java Data Structure Python JavaScript CSS Ajax PL/SQL PHP Puzzles C programs C++ programs Java programs

Home » Java programming language

What is Multi Threading in Java?

In this article, we are going to learn what is multi threading in java? Lean multi threading using example/program in java.
Submitted by Preeti Jain, on March 03, 2018

Executing multiple tasks simultaneously is called multithreading.

Each tasks are separate independent part of the same program is called 'Thread'.

It works on program level.

Main objective of multithreading is to improve performance of the system by reducing response time (i.e. we have 10 employees working on a large project and sudden 20 more employees joined our team to complete the same project so response time will be reduced).

The main important application areas of multithreading are video games, multimedia graphics, animation, etc.

Java provides inbuilt support for multithreading by introducing rich API (application programming interface) are Thread, Runable, ThreadGroup, ThreadLocal etc.

Being a developer we have to know how to use API and we are not responsible to define that API (API contains classes, interface, methods etc.)

With the help of multithreading it is very easy to write programs and we can use readymade methods for quick support.


class Thread1 extends Thread{
	public void run(){

class Thread2 extends Thread{
	public void run(){

class Thread3 extends Thread{
	public void run(){

class MainThread{
	public static void main(String[] args){
		Thread1 t1 = new Thread1();
		Thread2 t2 = new Thread2();
		Thread1 t1 = new Thread3();

Related thread posts...

  1. Explain life cycle of a thread in java.
  2. Thread properties in java.
  3. How to Create Java Threads (java examples to create threads)?
  4. Thread Synchronisation in Java with Example.
  5. Difference between Process and Thread in java.
  6. Differences between User Thread and Daemon Thread in Java.
  7. How to create daemon thread in java?
  8. What will happen if we don't override thread class run() method in java?
  9. How can we achieve Thread Safety in java?
  10. Thread Scheduler and Time Slicing in Java.
  11. Thread pool in java, how to create it?
  12. How to get and set name of a thread in Java?

Liked this article? Do share with your friends :)

Are you a blogger? Join our Blogging forum.