Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.
Comment: update link

...

A related error can arise when a programmer declares a static final reference to a mutable object; see OBJ50-JJG. Never confuse immutability of a reference with that of the referenced object for additional information.

...

According to §9.3, "Field (Constant) Declarations" of the Java Language Specification [JLS 2011], "Every field declaration in the body of an interface is implicitly public, static, and final. It is permitted to redundantly specify any or all of these modifiers for such fields."

Constants declared using the enum type are permitted to violate this guideline.

...