而且,使用大括号({和})时,还能使用多条语句。
And, with bracketing ({and}), you can use multiple statements.
这些简单的案例中提供了表达式,但它们也可以是规定多条语句的代码块(使用花括号)。
In these simple cases, expressions are provided, but they could also be blocks of code (using curly braces) to specify multiple statements.
添加到复杂的where语句的额外谓词,包括OR、AND和括号。
Additional predicates added to a complex WHERE clause, containing OR, and, and parentheses.
while语句看似适合用在这里,因此添加一组新括号,得到以下源代码。
The while statement seems like a reasonable place for this, so you add in a new set of parentheses to get the following source.
if语句里的条件加括号了么?
Do we put parentheses around the condition of an if statement?
大括号应该在所有复合语句中使用,即使只有一条语句,当它们是控制结构的一部分时,比如一个if或者for语句。
Braces should be used around all statements, even single statements, when they are part of a control structure, such as an if or for statement.
请注意integerLiteral 规则中用花括号包括的 System.out.println()语句。
Note the braces enclosing the System.out.println() statement in the integerLiteral rule.
括号(rulesets/braces.xml)——检查for、if、while和else语句是否使用了括号。
Braces (rulesets/braces.xml) -- Checks whether for, if, while, and else statements use braces.
提取这个语句的最简单的方式是从最内层的圆括号开始,向外构建。
The simplest way to extract this statement is to start from the innermost parentheses and build outwards.
复合语句是被包含在(大括号)的语句序列。
Compound statements are statements that contain lists of statements enclosed in (curly braces).
花括号中列出的方法执行的一系列步骤叫做语句。
The steps that the method performs are listed between the curly braces and are called statements.
(左大括号)应在复合语句其实行的结尾处。
The (left curly brace) should be at the end of the line that begins the compound statement.
我得到一个整数并把它存储,到n中,switch语句的圆括号里可以是一个整数,或者一个字符或其他的基本类型。
I get the int and store it in n. The switch statement takes inside its parenthesis an int or a char or some primitive type.
圆括号让语句在一个子 shell 中执行。
The parentheses effectively execute the statements in a subshell.
和字符串不同的是,列表是可以修改的。方括号运算符放到一个赋值语句的等号左侧的时候,就会把对应位置的列表元素重新赋值。
Unlike strings, lists are mutable. When the bracket operator appears on the left side of an assignment, it identifies the element of the list that will be assigned.
方括号内的表达式是一个元组。我们可以用元组赋值语句来遍历这个字典。
The expression in brackets is a tuple. We could use tuple assignment to traverse this dictionary.
函数调用:运行某个函数的语句。包括了函数的名字以及括号,括号内放函数需要的实际参数。
A statement that runs a function. It consists of the function name followed by an argument list in parentheses.
请注意,在上一个示例中,没有在初始化语句的左侧对隐式类型的数组使用方括号。
In the previous example, notice that with implicitly-typed arrays, no square brackets are used on the left side of the initialization statement.
注意:当用引用返回值时永远不要使用括号,这样行不通。只能通过引用返回变量,而不是语句的结果。
Note: you should never use parentheses around your return variable when returning by reference, as this will not work.
注意:当用引用返回值时永远不要使用括号,这样行不通。只能通过引用返回变量,而不是语句的结果。
Note: you should never use parentheses around your return variable when returning by reference, as this will not work.
应用推荐