Top "Enums" questions

A data type consisting of a set of named values called elements, members or enumerators of the type.

How do I add more members to my ENUM-type column in MySQL?

The MySQL reference manual does not provide a clearcut example on how to do this. I have an ENUM-type column …

mysql enums alter-table
Where is the documentation for the values() method of Enum?

I declare an enum as : enum Sex {MALE,FEMALE}; And then, iterate enum as shown below : for(Sex v : Sex.…

java enums
C++: Print out enum value as text

If i have an enum like this enum Errors {ErrorA=0, ErrorB, ErrorC}; Then i want to print out to console …

c++ enums
Is it possible to assign numeric value to an enum in Java?

Is anything like this possible in Java? Can one assign custom numeric values to enum elements in Java? public enum …

java enums
Print text instead of value from C enum

int main() { enum Days{Sunday,Monday,Tuesday,Wednesday,Thursday,Friday,Saturday}; Days TheDay; int j = 0; printf("Please enter the day …

c enums
How to check if any flags of a flag combination are set?

Let's say I have this enum: [Flags] enum Letters { A = 1, B = 2, C = 4, AB = A | B, All = A | B | C, } To …

c# enums flags
Most common C# bitwise operations on enums

For the life of me, I can't remember how to set, delete, toggle or test a bit in a bitfield. …

c# .net enums bit-manipulation flags
Can my enums have friendly names?

I have the following enum public enum myEnum { ThisNameWorks, This Name doesn't work Neither.does.this; } Is it not possible …

c# enums
Why would an Enum implement an Interface?

I just found out that Java allows enums to implement an interface. What would be a good use case for …

java enums
Filling a List with all enum values in Java

I would like to fill a list with all possible values of an enum Since I recently fell in love …

java list enums