Explanation of multithreading in java programming
What is multithreading in java in simple words?
Multithreading
Multithreading is a powerful programming tool that makes it possible to achieve concurrent execution of multiple units of a program.In another word it is Concurrent execution of several parts of the same program at same time(This will improve CPU utilization).
Advantages of multithreading in java
Multi threading support for java includes thread creations,thread prioritizing,thread scheduling,resource locking (thread synchronization)and establishing inter thread communication.
What is thread and how to create a thread in java?
A thread can be defined as a process in execution within a program.
A thread is a lightweight process and it is an individual part of a running program.
Group of threads is called a program.All these threads will be working concurrently.
There are two ways to create a thread.
1 By extending the thread class
2 By implementing the runnable interface
Comments
Post a Comment