Consider the following class Which of the following will create and start this thread? (a) New Runnable(MyClass).start();

Question:

Consider the following classpublic class MyClass implements Runnable { public void run () // some code here {

Which of the following will create and start this thread?

(a) New Runnable(MyClass).start();

(b) New Thread(MyClass).run();

(c) New Thread(new MyClass()).start();

(d) New MyClass().start();

Fantastic news! We've Found the answer you've been seeking!

Step by Step Answer:

Related Book For  book-img-for-question
Question Posted: