2. What is Thread?
A thread is a lightweight sub-process, the smallest unit of
processing. This is the path followed when executing a
program. A thread is an independent path of execution within
a program. All Java programs have at least one thread.
2
3. What is Multithreading?
Multithreading is a concept of programming where a program
is divided into two or more threads or sub-process which are
executed at the same time in parallel by sharing their
processing resources.
A program that contains multiple flows of control is known as
multithreaded program.
3
10. Advantages of Multithreading in Java
• We can perform multiple operations at the same time and it does not
block the user, because threads are independent.
• Simple programming diagram and parallel execution system.
• Useful for improving the responsiveness of the user interfaces.
• Improves the performance of complex applications.
• Reduces maintenance costs.
• Better use of CPU resource.
10