What is enum in Java?

An enum type is a special data type that enables for a variable to be a set of predefined constants . The variable must be equal to one of the values that have been predefined for it. Common examples include compass directions (values of NORTH, SOUTH, EAST, and WEST) and the days of the week.

Sizin İçin Seçtik  What is the advantage of factory constructor in Dart?

Leave a Reply

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