Why should Java method names not contain underscores?

I am using PMD to check java coding violations

public void testCaseMethod_4_2_16(){
   //some implementation 
}

Of which 4_ 2_ 16 is test case number 4.2 sixteen

When I check for PMD violations, the method name it displays should not contain underscores, and according to PMD rules, the violation will be displayed as a blocker So this is my question:

>Why should method names not contain underscores defined as blocker or PMD errors? > What PMD violations should we avoid > What violations should we try to fix?

As for my understanding, at least we should avoid the first two levels of violations shown by PMD Any help with PMD rules will be appreciated thank you

Solution

It is a set standard so that people can easily read each other's code, making the code easier to maintain

The following references are from the Oracle website java code conventions:

The content of this article comes from the network collection of netizens. It is used as a learning reference. The copyright belongs to the original author.
THE END
分享
二维码
< <上一篇
下一篇>>