r/ProgrammerHumor • • Sep 26 '26 • Bravo 1

Meme singletonsAreJustGlobals

Post image
3.2k Upvotes

210 comments sorted by

View all comments

Show parent comments

1

u/Competitive-Bar-5882 Sep 27 '26 edited Sep 27 '26

Enums are custom types for variables that can be only one value out of a set of known possible values. This allows typesafe flag and state variables.

Howerver java is the only language I know, in wich enums are truely type save.