Thread in Java - What is it and Why it is Used

A thread is actually a lightweight process. Unlike many other computer languages, Java provides built-in support for multithreaded programming.

Code :