Help the world stop coronavirus! Stay home!

Prev Next

Java / Enum

Can a enum constructor be declared public in Java?

No. Enum constructor cannot be declared as public. The constructor for an enum type must be package-private or private access. It automatically creates the constants that are defined at the beginning of the enum body. You cannot invoke an enum constructor yourself.

❤Cash Back At Stores you Love !!!❤

Earn your $10 reward when you make your first purchase through Ebates by signing up with clicking below button.

Ebates Coupons and Cash Back

More Related questions...

Show more question and Answers...

Arrays

Comments & Discussions