Enum constants: UPPERCASE or CameCase?

I wasn’t even aware that the coding convention allows for all caps. I always use the camel case starting with an uppercase letter.
IMO this it’s more consistent with the rest of the language. Enum constants are similar to objects inheriting from sealed classes. You would never name those with all caps.
But then based on the java coding convention you should name them with all caps since the instances of an enum are considered a constant. So maybe there are argument for both. Still I prefer camel case.

1 Like