Consider the following class declaration: class X implements Runnable {/*...*/} Which of the following code segments is

Question:

Consider the following class declaration: class X implements Runnable {/*...*/} Which of the following code segments is used to start a new thread?

(a) New Thread(new X()).start();

(b) New X().start();

(c) Thread t = new Thread(X); t.start();

(d) X x = new X(); x.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: