24.
What will be the output of the following Java code snippet?
class A
{
 
}
 
enum Enums extends A
{
    ABC, BCD, CDE, DEF;
}

25.
What will be the output of the following Java program?
class mainclass {
    public static void main(String args[]) 
    {
        boolean var1 = true;
  boolean var2 = false;
  if (var1)
      System.out.println(var1);
  else
      System.out.println(var2);
   } 
}

27.
What will be the output of the following Java code snippet?
enum Enums
{
    A, B, C;
 
    private Enums()
    {
        System.out.println(10);
    }
}
 
public class MainClass
{
    public static void main(String[] args)
    {
        Enum en = Enums.B;
    }
}

Read More Section(Data Types and Variables)

Each Section contains maximum 100 MCQs question on Data Types and Variables. To get more questions visit other sections.