MCQs>IT & Programming>Core Java MCQs>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 ?
Core Java MCQs
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 ?
Answer
Correct Answer: X run = new X(); Thread t = new Thread(run); t.start();
Explanation:
Note: This Question is unanswered, help us to find answer for this one