Multi Threading Java Interview Questions – Set 10
Explain different ways of creating a thread Threads can be used by either: Extending the Thread class. Implementing the Runnable interface. Using the Executor framework (this creates a thread pool) By extends: class Counter extends Thread { //method where the thread execution will start public void run(){ //logic to execute in a thread } //let’s see how to start the … Read more