4. 6/1/2022 Annual Review 4
Multithreading
Multithreading in Java is a process of
executing multiple threads
simultaneously.
A thread is a lightweight sub-process,
the smallest unit of processing.
Multiprocessing and multithreading,
both are used to achieve multitasking.
6. 6/1/2022 Annual Review 6
It doesn't block the user
because threads are
independent and you can
perform multiple operations
at the same time.
Threads are independent, so
it doesn't affect other
threads if an exception
occurs in a single thread.
You can perform many
operations together, so it
saves time.
Advantages of Multithreading