Can we use in enum?

Enums are used when we know all possible values at compile-time , such as choices on a menu, rounding modes, command-line flags, etc. It is not necessary that the set of constants in an enum type stay fixed for all time. In Java (from 1.5), enums are represented using enum data type.

Sizin İçin Seçtik  Can we use contains in switch-case Java?

Leave a Reply

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