One can utilise enums in a program when they want the variables in the program to have just the set of values. For instance, let us consider the creation of a direction variable. Now, there are a total of four directions (N, S, W, E). Thus, a total of four values are possible with the direction variable. But here, the variable would be able to hold just a single value at any given time. Now, if a user provides any different value to the variable here, then we would get a compilation error.
We can also use enum in the case of the switch case statements. In this statement, we pass all the enum variables within the switch parenthesis. This step would basically ensure that we have to define the value of the case block in an enum.