class X implements Runnable { public static void main(String args[]) { /* Missing code? */ } public void run() {} } Which of the following line of code is suitable to start a thread ? - Study24x7
Social learning Network
study24x7

Default error msg

Login

New to Study24x7 ? Join Now
Already have an account? Login
03 Mar 2023 01:01 PM study24x7 study24x7

class X implements Runnable { public static void main(String args[]) { /* Missing code? */ } public void run() {} } Which of the following line of code is suitable to start a thread ?

A

Thread t = new Thread(X);

B

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

C

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

D

Thread t = new Thread(); x.run();

study24x7
Write a comment
Related Questions
500+   more Questions to answer
Most Related Articles