...
Code Block | ||
---|---|---|
| ||
public static final int ADULT_AGE = 18; public static final int ALCOHOL_AGE = ADULT_AGE + 3; |
A programmer performing routine maintenance may modify the definition for ADULT_AGE
but fail to recognize the resulting change in the definition for ALCOHOL_AGE
.
Compliant Solution
Instead, the definitions should reflect the lack of a relationship between the two constants.
...