1.

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

A. Thread[New Thread created...,10,main]
B. [New Thread created...,10,main]
C. New Thread created...
D. [New Thread created...,10,main]Thread
E. None of these
Answer» B. [New Thread created...,10,main]


Discussion

No Comment Found

Related MCQs