Multithreading in java watch online session on youtube in Hindi)
How to create thread in javawatch online session on youtube in Hindi)
What is runtime stack in Java?watch online session on youtube in English)
Sleep Method in Java ?watch online session on youtube in English)
What is Java Lock? Or Synchronizationwatch online session on youtube in English)
What is Thread Group in Java?watch online session on youtube in English)
What is MultiThreading?
MultiThreading in Java is a technique, which is used to for multi-tasking. Just like when a user wants to do multiple works at a time on the single system, then this type of work is called multi-tasking.
For example, Navneet wants to listen to music on her computer, at the same time she wants to download a song from The Internet, and also she wants to write a mail to her boss in the office.
Who Performs Multithreading ?
The answer is Threads.
How this thread works and How can we use these thread in our program to perform multithreading concept.
There are two ways to use Thread in Java:
1. By extending Thread class
2. By implementing Runnable interface
By extending Thread Class:
Example: