What is the advantage of using enum?

It is basically a data type that lets you describe each member of a type in a more readable and reliable way, for example, temperature level like High, Medium and Low. The main advantage of Enum is that it make your code more explicit, less error-prone and in a self-documenting way .

Sizin İçin Seçtik  Can enums have values Java?

Leave a Reply

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