Brian

41%
Flag icon
But it also includes other sets for which you know all the possible values at compile time, such as choices on a menu, operation codes, and command line flags. It is not necessary that the set of constants in an enum type stay fixed for all time. The enum feature was specifically designed to allow for binary compatible evolution of enum types.
Brian
Recommendations for safely persisting enum types when we recognize the enum set might change over time (if we allow for only expanding and not shrinking list)? I assume there are no guarantees of value consistency across compilations? Or are there if order of declaration doesn’t change? Maybe also if new values are only appended?...
Robert
· Flag
Robert
> I assume there are no guarantees of value consistency across compilations? Or are there if order of declaration doesn’t change? Maybe also if new values are only appended?
The guarantee on the compil…
Effective Java
Rate this book
Clear rating
Open Preview