Index:
- What is Thread?
- Advantages of thread?
- How Threads are created in java?
- Difference between Thread class & Runnable interface?
- Lifecycle of thread (How thread travels)
1. What is Thread?
1. Any executable program is called as Thread.
2. Thread is a class in java present in java.lang package
3. Process of executing multiple threads simultaneously is
called as MultiThreading.
Consider below example to understanding thread:
Example of Multithreading |