74.
What will be the output of the following Java code?
class newthread implements Runnable
{
Thread t;
newthread()
    {
  t = new Thread(this,"New Thread");
  t.start();
}
public void run()
    {
  t.setPriority(Thread.MAX_PRIORITY);	
        System.out.println(t);
}
}
class multithreaded_programing
{
    public static void main(String args[])
    {
        new newthread();        
    }
}

76.
Which of these statement is incorrect?

78.
What will be the output of the following Java program?
class newthread extends Thread
{
Thread t;
newthread()
    {
  t1 = new Thread(this,"Thread_1");
  t2 = new Thread(this,"Thread_2");
  t1.start();
  t2.start();
}
public void run()
    {
  t2.setPriority(Thread.MAX_PRIORITY);	
  System.out.print(t1.equals(t2));
    }    
}
class multithreaded_programing
{
    public static void main(String args[])
    {
        new newthread();        
    }
}

80.
What will be the output of the following Java code?
class newthread extends Thread 
{
newthread()
    {
  super("My Thread");
  start();
}
public void run()
    {
  System.out.println(this);
}
}
class multithreaded_programing
{
    public static void main(String args[])
    {
        new newthread();        
    }
}

Read More Section(Threads)

Each Section contains maximum 100 MCQs question on Threads. To get more questions visit other sections.