πŸ“Š JAVA
Q. 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);
}
}
class multithreaded_programing
{
public static void main(String args[])
{
new newthread();
}
}
  • (A) My Thread
  • (B) Thread[My Thread,5,main]
  • (C) Compilation Error
  • (D) Runtime Error
πŸ’¬ Discuss
βœ… Correct Answer: (B) Thread[My Thread,5,main]

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
123
Total Visits
πŸ“½οΈ
12 mo ago
Published
πŸŽ–οΈ
Sonali Mishra
Publisher
πŸ“ˆ
90%
Success Rate