Examveda
Examveda

What will be the output of the following Java code snippet?
 enum Levels 
{
    private TOP,
 
    public MEDIUM,
 
    protected BOTTOM;
}

A. Runtime Error

B. EnumNotDefined Exception

C. It runs successfully

D. Compilation Error

Answer: Option D


This Question Belongs to Java Program >> Data Types And Variables

Join The Discussion

Related Questions on Data Types and Variables