child of #14942
I have read check documentation: https://checkstyle.org/checks/naming/constantname.html
I have downloaded the latest checkstyle from: https://checkstyle.org/cmdline.html#Download_and_Run
I have executed the cli and showed it below, as cli describes the problem better than 1,000 words
From check documentation:
A constant is a static and final field or an interface/annotation field, except serialVersionUID and serialPersistentFields.
unnamed variables can't be field
PS D:\CS\test> cat src/Test.java
import java.util.PriorityQueue;
import java.util.Queue;
public class Test {
final static int _ = 0;
}
PS D:\CS\test> javac src/Test.java
src\Test.java:5: error: underscore not allowed here
final static int _ = 0;
^
1 error
PS D:\CS\test>
Describe what you expect in detail.
no update is needed this can be closed
child of #14942
I have read check documentation: https://checkstyle.org/checks/naming/constantname.html
I have downloaded the latest checkstyle from: https://checkstyle.org/cmdline.html#Download_and_Run
I have executed the cli and showed it below, as cli describes the problem better than 1,000 words
From check documentation:
unnamed variables can't be field
Describe what you expect in detail.
no update is needed this can be closed