javatriggerssalesforceapexapex-code

Doesn't match '[a-z][a-zA-Z0-9]*' (rule: Code Style-MethodNamingConventions)


I dont understand whats the issue here is. Please still gives the error.

 public static void AmountHandlertest(){
    //CODE;

}

I want to run that method but shows an error saying Doesn't match '[a-z][a-zA-Z0-9]*' (rule: Code Style-MethodNamingConventions)


Solution

  • The error message you're seeing indicates that the method name AmountHandlertest doesn't match the specified naming convention [a-z][a-zA-Z0-9]*. In most programming languages, including Java, there are standard naming conventions for methods, variables, classes, etc. The naming convention mentioned in the error message follows the standard Java method naming convention, which usually starts with a lowercase letter.

    To fix the error, you should rename your method to start with a lowercase letter. For example:

    public static void amountHandlerTest() {
    // CODE;
    }