Threads in Java — Part 1

  1. Process-based multi tasking

Multiple Threads

Multiple threads mean multiple flows of execution.

  1. Extend Thread class

Advantages and Disadvantages of Extend Thread class and Runnable Interface..

Look at the following example.

Is it must to override the run() in Thread Implementation class?

The direct answer is No. Let’s see what will happen when we are not override run() in Thread class in Java.

--

--

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Sanduni Jayaweera

Sanduni Jayaweera

Associate Software Engineer at Virtusa.