Q. 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
πŸ’¬ Discuss
βœ… Correct Answer: (D) Compilation Error

You must be Logged in to update hint/solution

πŸ’¬ Discussion


πŸ“Š Question Analytics

πŸ‘οΈ
116
Total Visits
πŸ“½οΈ
2 y ago
Published
πŸŽ–οΈ
Ranjeet
Publisher
πŸ“ˆ
91%
Success Rate