Identifiers are the names of variables, methods, classes, packages and interfaces.
下列哪些是合法的 java 标识符?(ABD)
(a) $byte
(b) IDONOTLIKELONGNAMES
(c) const (关键字)
(d) _ok
(e) 3_case (数字开头)
标识符由字母、数字、下划线 _ 、美元符号 $ 或者人民币符号 ¥ 以及 Unicode 字符组成,并且首字母不能是数字。
goto 和 const 虽然在 Java 中没有意义,但仍然被保留为关键字,不能做标识符
blog comments powered by Disqus