V

Vijay Sangwan • 28.62K Points
Instructor II

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();
}
}
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
  • Correct Answer - Option(C)
  • Views: 16
  • Filed under category JAVA

No solution found for this question.
Add Solution and get +2 points.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.


Question analytics