🎉 October Learning Month — learn a new software term every day!
An interactive flashcard trainer for software engineering terms.

Enum

In plain terms

A type with a fixed set of named constant values.

Going deeper

An enum (enumeration) defines a type whose values are a fixed list of named options, improving clarity and safety over raw constants. It enumerates valid choices.

Under the hood

Prevents invalid values and enables exhaustive checks; some languages allow methods on enums.

Examples

Color {RED, GREEN, BLUE}, status codes, days of week, type safety.

Think of it like...

Like a multiple-choice field that only accepts the listed options.

Feedback & Bug Report