Enum Values Are Public Static Final Constants
What You'll Learn
You'll understand that each value you define in an enum is automatically a public static final constant—no need to write those keywords yourself.
The Core Idea
When you declare enum values like this:
enum Day {
MONDAY, TUESDAY, WEDNESDAY
}
Each name (MONDAY, TUESDAY, WEDNESDAY) is implicitly a public static final constant of type Day. Java creates these for you behind the scenes.
Think of it like this: if you were writing a class with constants the old-fashioned way, you'd write:
public static final Day MONDAY = new Day();
public static final Day TUESDAY = new Day();
But enums do this automatically! You just list the names, and Java treats them as if they were declared with public static final. This means:
public: accessible from anywherestatic: belong to the enum type itself, not instancesfinal: cannot be reassigned—they're fixed values
Why This Matters
Because enum values are static, you access them using the enum type name:
Day today = Day.MONDAY; // Day.MONDAY, not new Day()
Because they're final, you can't accidentally change what MONDAY refers to. They're guaranteed to be the same constant throughout your program's lifetime.
You never use the new keyword with enums—the values already exist as constants when your program starts.
Key Takeaway:
Every enum value is automatically public static final—a fixed, globally accessible constant of that enum type, created once and shared everywhere.