Home » Java Programming » Threads

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

Correct Answer: X run = new X(); Thread t = new Thread(run); t.start();

Explanation:

Option C is suitable to start a thread.
← Previous Question Next Question→

Discussion & Comments

No comments yet. Be the first to comment!
Join Discussion