...
Code Block | ||
---|---|---|
| ||
public static final int VOTING_AGE = 18; public static final int ALCOHOL_AGE = 21; |
Applicability
Failure to properly encode relationships in constant declarations can lead to unexpected values and can complicate maintenance.
Bibliography
[JLS 2011] §4.12.4, "final
Variables"
...