NAMING.USF
Use only uppercase letters and underscores when naming "final" "static" fields
Description
This rule flags any "final" "static" field that has an unconventional name format.
Use only uppercase letters and underscores when naming "final" "static" fields (i.e. named constants).
Example
package NAMING;
class USF {
public static final int size = 10; // Violation
}
Repair
class USF_fixed {
public static final int SIZE = 10;
}
Reference
Java Language Specification, section 6.8.5.
|