73.
Why are generics used?

74.
What will be the output of the following Java program?
import java.lang.reflect.*;
class Additional_packages 
{	 
     public static void main(String args[]) 
     {
   try
         {
       Class c = Class.forName("java.awt.Dimension");
 Method methods[] = c.getMethods();
 for (int i = 0; i < methods.length; i++)
     System.out.println(methods[i]);
   }
   catch (Exception e)
         {
             System.out.print("Exception");
         }
    }
}

80.
What will be the output of the following Java program?
class newthread implements Runnable 
{
Thread t1,t2;
    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();        
    }
}

Read More Section(Interfaces and Abstract Classes)

Each Section contains maximum 100 MCQs question on Interfaces and Abstract Classes. To get more questions visit other sections.