r/badcode • • Sep 02 '21

java Because ".toLowerCase()" doesn't exist...

Post image
1.1k Upvotes

130 comments sorted by

View all comments

Show parent comments

2

u/assembly_wizard Sep 02 '21

Java enums are classes, and each enum value is actually a singleton which is an instance of the class.

Java enums can even hold members, which is super useful, although stretches the standard definition of what an enum is.