...
Wiki Markup |
---|
According to [§13.4.9, "{{final}} Fields and Constants" |http://java.sun.com/docs/books/jls/third_edition/html/binaryComp.html#13.4.9] of the _Java Language Specification_ \[[JLS 2005|AA. Bibliography#JLSReferences#JLS 05]\] |
Other than for true mathematical constants, we recommend that source code make very sparing use of class variables that are declared
static
andfinal
. If the read-only nature offinal
is required, a better choice is to declare aprivate static
variable and a suitable accessor method to get its value.
...
Wiki Markup |
---|
*DCL04-EX1*: According to [§9.3, "Field (Constant) Declarations" |http://java.sun.com/docs/books/jls/third_edition/html/interfaces.html#9.3] of the _Java Language Specification_ \[[JLS 2005|AA. Bibliography#JLSReferences#JLS 05]\], "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." |
...
<ac:structured-macro ac:name="unmigrated-wiki-markup" ac:schema-version="1" ac:macro-id="af0da321af39366e-c3f4d496-48a947bc-b71c9f2b-4b7789980ff512aff4fd373c"><ac:plain-text-body><![CDATA[ | [[JLS 2005 | AA. Bibliography#JLS References#JLS 05]] | [§13.4.9, "final Fields and Constants" | http://java.sun.com/docs/books/jls/third_edition/html/binaryComp.html#13.4.9] | ]]></ac:plain-text-body></ac:structured-macro> |
| |||||
| |||||
|
...