Hello guys,
I have a quick question regarding enums. I have an enum called test which is made of multiple colors as shown. I want iterate using a for loop from i=0 to or from 4 to zero or whatever and I want to print the corresponding color name.
Can it be done using casting. I know I can print the corresponding number to each color what I want to do is print the color name corresponding to a certain number from 0 -4. I tried casting but I just get the integer values.