2.
What will be the output of the following Java program?
class Output 
{
    public static void main(String args[]) 
    {
        char a[] = {'a', '5', 'A', ' '};   
        System.out.print(Character.isDigit(a[0]) + " ");
        System.out.print(Character.isWhitespace(a[3]) + " ");
        System.out.print(Character.isUpperCase(a[2]));
    }
}

5.
What will be the output of the following Java code snippet?
int a = random.nextInt(7) + 4;

7.
What will be the output of the following Java program?
import java.util.*;
class LOCALE_CLASS
{
    public static void main(String args[])
    {
        Locale obj = new Locale("INDIA") ;
        System.out.print(obj.getCountry());
    }
}

8.
What will be the output of the following Java program?
class Output
{
    public static void main(String args[]) 
    {
 String x = Boolean.toString(false);
    }
}

9.
What will be the output of the following Java program?
class X 
{
    int a;
    double b;
}
class Y extends X 
{
int c;
}
class Output 
{
    public static void main(String args[]) 
    {
        X a = new X();
        Y b = new Y();
        Class obj;
        obj = b.getClass();
        System.out.print(obj.isInstance(a));
    }
}

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.