Decision Makings and Branching

Decision Makings and Branching Quiz

3
Created on By 52fd849a905aedf0249df9e69d61b55a?s=32&d=mm&r=gwefru

Decision Makings and Branching

TEST YOUR SKILLS BRODLY

1 / 10

Q.131  What is the order of variables in Enum?

2 / 10

Q.132 Can we create an instance of Enum outside of Enum itself?

3 / 10

Q.133 What will be the output of the following Java code?

enum Season
{
WINTER, SPRING, SUMMER, FALL
};
System.out.println(Season.WINTER.ordinal());

4 / 10

Q.134 If we try to add Enum constants to a TreeSet, what sorting order will it use?

5 / 10

Q.135 What will be the output of the following Java code snippet?

class A
{

}

enum Enums extends A
{
ABC, BCD, CDE, DEF;
}

6 / 10

Q.136 What will be the output of the following Java code snippet?

enum Levels
{
private TOP,

public MEDIUM,

protected BOTTOM;
}

7 / 10

Q.137

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;
}
}

8 / 10

Q.138 Which method returns the elements of Enum class?

9 / 10

Q.139 Which class does all the Enums extend?

10 / 10

Q.140 Are enums are type-safe?

Your score is

The average score is 50%

0%

Leave a Reply

Your email address will not be published. Required fields are marked *