Q190
What will be the output of the following Java program? class newthread implements Runnable Thread t; newthread() t = new Thread(this,"My Thread"); t.start(); public void run() System.out.println(t.getName()); class multithreaded_programing public static void main(String args[]) new newthread();
A.
My Thread
AnswerB.
Thread[My Thread,5,main]
C.
Compilation Error
D.
Runtime Error
Answer: Option A
Solution
Answer: Option A
No explanation is given for this question Let's Discuss on Board