
Tyler P. answered 04/12/19
3rd Year Software Engineering Student
Enums are very useful when describing a variable that can be one a certain set of states or values. For example you could have an enum called "PrimaryColor" where the only possible states of that enum are "Red", "Green", and "Blue". You can now declare variables that are of the type "PrimaryColor" and those variables can only be assigned to "Red", "Green", or "Blue". As an added bonus most languages allow you to correlate these values with either integers or some other type of data so that you can more easily compare the enum states or convert them or do arithmetic with them.