Method name camelCase (ARCH4002)
Ce contenu n’est pas encore disponible dans votre langue.
Key java.naming.method-name-camelcase · Severity warning · Category naming
Java method names should use camelCase (first letter lowercase, subsequent words capitalized). PascalCase or snake_case breaks the language convention.
Incorrect
Section titled “Incorrect”public class Cart { public int CalculateTotal() { return 0; }}Correct
Section titled “Correct”public class Cart { public int calculateTotal() { return 0; }}Lowercase the method’s first letter to convert it to camelCase.