3 ms·
Although enums weren't introduced until Java 5, enum was always a reserved word in Java. module, requires, yield, and record are not reserved words, and can s
by Reason077 7y ago
Although enums weren't introduced until Java 5, enum was always a reserved word in Java.
module, requires, yield, and record are not reserved words, and can still be used as names for members etc.
- _old_dude_ 7y ago> enum was always a reserved word in Java Nope, i had to patch a bunch of codes because enum was not a reserved keyword until it was introduced in Java 5.
- chrisseaton 7y ago> enum was always a reserved word in Java This isn't true. It isn't listed in the list of keywords in Section 3.9 of the 1996 Java specification.
- Reason077 7y agoMy apologies, you are right. I was confusing it with const, which has always been a reserved word (despite never being used).