Question: Consider the following code: public class MyThread implements Runnable { public void run() { // some code goes here } } Which of the following


Consider the following code: public class MyThread implements Runnable { public void run() { // some code goes here } } Which of the following responses will create and start a thread? new Thread(new MyThread().start(); new MyThread(new Thread).start(); new MyThread(new Thread).run(); new MyThread().start(); new Runnable(MyThread).start(); new Thread(My Thread).run(); new MyThread(new Thread).init().start().run(); O None of the answers are correct
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
