-
What is the output of this program?
class Mythread extends Thread
{
Mythread()
{
super("New Thread...");
start();
}
public void run()
{
System.out.println(this);
}
}
public class multithreaded_programing
{
public static void main(String args[])
{
new Mythread();
}
}
-
- New Thread...
- [New Thread...,5,main]
- Thread[New Thread...,5,main]
- Thread
- None of these
Correct Option: C
Although we have not created any object of thread class still we can make a thread pointing to main method, we can refer it by using this.