A

Admin • 832.27K Points
Coach

Q. Which of the following is TRUE about enum constructors?

  • (A) Enum constructors must be public
  • (B) Enum constructors must be private or package-private
  • (C) Enum constructors can be protected
  • (D) Enum constructors must be static
  • Correct Answer - Option(B)
  • Views: 22
  • Filed under category Java
  • Hashtags: Java Enums

Explanation by: Admin

Enum constructors in Java are implicitly private or package-private. You cannot declare them as public or protected.

You must be Logged in to update hint/solution

Discusssion

Login to discuss.

Be the first to start discuss.