62.
What will be the output of the following Java program?
class Output 
{
    public static void main(String args[])
    {
  String str = "true false";
        boolean x = Boolean.parseBoolean(str);
        System.out.print(x);
    }
}

63.
What will be the output of the following Java code?
import java.io.*;
class files 
{
    public static void main(String args[]) 
    {
        File obj = new File("/java/system");
        System.out.print(obj.getName());
    }
}

65.
What will be the output of the following Java program?
class exception_handling 
{
    public static void main(String args[]) 
    {
        try 
         {
            int a = 1;
            int b = 10 / a;
            try 
            {
                 if (a == 1)
                     a = a / a - a;
                 if (a == 2) 
                 {
                     int c[] = {1};
                     c[8] = 9;
                 }
            finally 
            {
                System.out.print("A");
            }

        }
        catch (NullPointerException e) 
        {
                System.out.println("B");
        }
    }
}

67.
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");
 Constructor constructors[] = c.getConstructors();
 for (int i = 0; i < constructors.length; i++)
     System.out.println(constructors[i]);
   }
   catch (Exception e)
         {
               System.out.print("Exception");
         }
    }
}

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.