Java Reference
In-Depth Information
{
[ VariableInitializer {
,
VariableInitializer } [
,
] ]
}
Block:
{
BlockStatements
}
BlockStatements:
{ BlockStatement }
BlockStatement:
LocalVariableDeclarationStatement
ClassOrInterfaceDeclaration
[Identifier
:
] Statement
LocalVariableDeclarationStatement:
{ VariableModifier } Type VariableDeclarators
;
Statement:
Block
;
Identifier
:
Statement
StatementExpression
;
if
ParExpression Statement [
else
Statement]
assert
Expression [
:
Expression]
;
switch
ParExpression
{
SwitchBlockStatementGroups
}
while
ParExpression Statement
do
Statement
while
ParExpression
;
for (
ForControl
)
Statement
break
[Identifier]
;
continue
[Identifier]
;
return
[Expression]
;
throw
Expression
;
synchronized
ParExpression Block
try
Block (Catches | [Catches] Finally)
try
ResourceSpecification Block [Catches] [Finally]
StatementExpression:
Expression
Catches:
CatchClause { CatchClause }
CatchClause:
catch (
{VariableModifier} CatchType Identifier
)
Block
CatchType:
QualifiedIdentifier {
|
QualifiedIdentifier }
Finally:
finally
Block