D

Dhruva Jagannath • 660 Points
Invincible

Q. What happens when you try to subclass an enum?

  • (A) It compiles but fails at runtime
  • (B) It compiles and runs
  • (C) Compile-time error
  • (D) It throws an exception

Explanation by: Dhruva Jagannath
You cannot subclass an enum, and trying to do so results in a compile-time error.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.