Skip to main content

Enum

Enum is a type that has a fixed set of values. It is useful to represent a set of related constants.

TODO: Explain in some language it is only integer while in some language it can be string and include user defined fields.

public enum Color {
RED, GREEN, BLUE
}