我读到了 naming of Java variables .它说 Java 变量不能以除 $ 和 _ 之外的任何数字和特殊字符开头。
一些有效的例子:
int count;
int _count;
int $count;
还有一些无效的例子:
int %count;
int 4count;
int #count;
相同的规则是否适用于方法名称?
最佳答案
关于java - Java 方法名称的有效字符是什么?,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/10211135/