Q. What is the output of this program?
Code:
enum Levels
{
private machinA,
public machinB,
protected machinC;
}
β
Correct Answer: (A)
Compilation error
Explanation: Enum cannot have an access modifier. They are public, static and are final by default.