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

πŸ‘οΈ
93
Total Visits
πŸ“½οΈ
1 y ago
Published
πŸŽ–οΈ
Ranjeet
Publisher
πŸ“ˆ
95%
Success Rate