expressions 的 Java 教程说的是
expression is a construct made up of variables, operators, and method invocations
为什么文字不包含在此列表中?
最佳答案
Java Language Specification状态:
15.8. Primary Expressions
Primary expressions include most of the simplest kinds of expressions, from which all others are constructed: literals, class literals, field accesses, method invocations, and array accesses. A parenthesized expression is also treated syntactically as a primary expression.
这应该是您寻找 java.lang.java 的定义或规范时的起点。教程或某些 API 文档注释(这就是 JavaDoc)不能用来反对同样的完整性声明。
关于Java 教程 表达式的不完整定义,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/51767425/