-
What is the output of this program?
class newthread implements Runnable
{
Thread thread;
newthread()
{
thread = new Thread(this,"My Thread created...");
thread.start();
}
public void run()
{
System.out.println(thread.getName());
}
}
public class multithreaded_Example
{
public static void main(String args[])
{
new newthread();
}
}
-
- My Thread created...
- My Thread
- Thread created...
- New Thread
- None of these
Correct Option: A
My Thread created...