Can enum have constructor in Java?

enum can contain a constructor and it is executed separately for each enum constant at the time of enum class loading.

Sizin İçin Seçtik  What is enum constructor in Java?

Leave a Reply

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