1.

What is the output of this program?class N extends Thread { Thread thread; String Str; N(String ThreadName) { Str = ThreadName; thread = new Thread(this,Str); thread.start(); } public void run() { } } public class multithreading_EqualsExample { public static void main(String args[]) { N object1 = new N("Hello"); N object2 = new N("Java"); try { System.out.print(object1.thread.equals(object2.thread)); } catch(Exception e) { System.out.print("Running main thread..."); } } }

A. Main Thread Running...
B. First
C. Second
D. True
E. False
Answer» F.


Discussion

No Comment Found

Related MCQs