Java Reference
In-Depth Information
V is [un]assigned before S iff V is [un]assigned after e when true.
V is [un]assigned before T iff V is [un]assigned after e when false.
16.2.8. assert Statements
The following rules apply both to a statement assert e 1 and to a statement assert e 1 : e 2
14.10 ) :
V is [un]assigned before e 1 iff V is [un]assigned before the assert statement.
V is definitely assigned after the assert statement iff V is definitely assigned before
the assert statement.
V is definitely unassigned after the assert statement iff V is definitely unassigned be-
fore the assert statement and V is definitely unassigned after e 1 when true.
The following rule applies to a statement assert e 1 : e 2 :
V is [un]assigned before e 2 iff V is [un]assigned after e 1 when false.
16.2.9. switch Statements
V is [un]assigned after a switch statement (§ 14.11 ) iff all of the following are true:
♦ Either there is a default label in the switch block or V is [un]assigned after the
switch expression.
♦ Either there are no switch labels in the switch block that do not begin a block-
statement-group (that is, there are no switch labels immediately before the “ }
that ends the switch block) or V is [un]assigned after the switch expression.
♦ Either the switch block contains no block-statement-groups or V is
[un]assigned after the last block-statement of the last block-statement-group.
V is [un]assigned before every break statement that may exit the switch state-
ment.
V is [un]assigned before the switch expression iff V is [un]assigned before the
switch statement.
If a switch block contains at least one block-statement-group, then the following rules also
apply:
V is [un]assigned before the first block-statement of the first block-statement-
group in the switch block iff V is [un]assigned after the switch expression.
Search WWH ::




Custom Search