Which four are true about enums?

Which four are true about enums?

Which four are true about enums?

A.
An enum is typesafe.

B.
An enum cannot have public methods or fields.

C.
An enum can declare a private constructor.

D.
All enums implicitly implement Comparable.

E.
An enum can subclass another enum.

F.
An enum can implement an interface.

Explanation:

C: The constructor for an enum type must be package-private or private access.
Reference: Java Tutorials,Enum Types



Leave a Reply 1

Your email address will not be published. Required fields are marked *


karim Ali

karim Ali

A
C
D
F