The Java Language Specification defines a set of rules called naming conventions that apply to Java programs. These conventions provide recommendations for naming packages, classes, methods, and variables.
By following shared naming conventions, teams can collaborate more efficiently.
This rule checks that static non-final field names match a provided regular expression.
The default regular expression applied by the rule is ^[a-z][a-zA-Z0-9]*$
:
public class MyClass { private static String foo_bar; // Noncompliant }
public class MyClass { private static String fooBar; }