1.

What is the output of this program?class newthread implements Runnable { Thread thread; newthread() { thread = new Thread(this,"My Thread created..."); thread.start(); } public void run() { System.out.println(thread.getName()); } } public class multithreaded_Example { public static void main(String args[]) { new newthread(); } }

A. My Thread created...
B. My Thread
C. Thread created...
D. New Thread
E. None of these
Answer» B. My Thread


Discussion

No Comment Found

Related MCQs