What is Thread in Java?

 The thread is an independent path of execution. It's a way to take advantage of multiple CPUs available on a machine. By using multiple threads you can speed up CPU-bound tasks. For example, if one thread takes 100 milliseconds to do a job, you can use 10 threads to reduce that task into 10 milliseconds. Java provides  support for multithreading at the language level

No comments:

Post a Comment