上述回答上有点瑕疵,标识符不应该狭隘地理解为有字母 数字 下划线 美元符号组成,oracle官网的java教程:https://docs.oracle.com/javase/specs/jls/se8/html/jls-3.html#jls-3.8,写道:An identifier is an unlimited-length sequence of Java letters and Java digits, the first of which must be a Java letter.Letters and digits may be drawn from the entire Unicode character set, which supports most writing scripts in use in the world today, including the large sets for Chinese(//中文), Japanese, and Korean. This allows programmers to use identifiers in their programs that are written in their native languages.An identifier cannot have the same spelling (Unicode character sequence) as a keyword (§3.9), boolean literal (§3.10.3), or the null literal (§3.10.7), or a compile-time error occurs.