A

Admin • 828.03K Points
Coach

Q. Can enums be declared inside a class in Java?

  • (A) Yes, only if the class is static
  • (B) Yes, both static and non-static classes
  • (C) No, enums must be top-level only
  • (D) Only inside abstract classes

Explanation by: Admin
Enums can be declared as static types inside both static and non-static classes.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.