32.
What will be the output of the following Java code?
class Output
{
    public static void main(String args[])
    {
        Double i = new Double(257.578);  
        int x = i.intValue();
        System.out.print(x);
    }
}

33.
What will be the output of the following Java code?
class A 
{
     int x;
     int y;
     void display() 
     {
          System.out.print(x + " " + y);
     }
}
class Output 
{
     public static void main(String args[]) 
     {
         A obj1 = new A();
         A obj2 = new A();
         obj1.x = 1;
         obj1.y = 2;
         obj2 = obj1.clone();
         obj1.display();
         obj2.display();
     }
}

34.
What will be the output of the following Java code?
class Output 
{
     public static void main(String args[]) 
     {
         double x = 3.14;  
         int y = (int) Math.abs(x);
         System.out.print(y);
     }
}

36.
What will be the output of the following Java program?
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();        
    }
}

38.
What will be the output of the following Java code?
class Output 
{
     public static void main(String args[]) 
     {
         double x = 3.14;  
         int y = (int) Math.ceil(x);
         System.out.print(y);
     }
}

40.
What will be the output of the following Java program?
class Output 
{
    public static void main(String args[]) 
    {
        Long i = new Long(256);  
        System.out.print(i.hashCode());
    }
}

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.