Java Reference
In-Depth Information
16.1.5. Conditional Operator ? :
Suppose that b and c are boolean-valued expressions.
V is [un]assigned after a ? b : c 15.25 ) when true iff V is [un]assigned after b
when true and V is [un]assigned after c when true.
V is [un]assigned after a ? b : c when false iff V is [un]assigned after b when false
and V is [un]assigned after c when false.
V is [un]assigned before a iff V is [un]assigned before a ? b : c .
V is [un]assigned before b iff V is [un]assigned after a when true.
V is [un]assigned before c iff V is [un]assigned after a when false.
V is [un]assigned after a ? b : c iff V is [un]assigned after a ? b : c when true and V is
[un]assigned after a ? b : c when false.
16.1.6. Conditional Operator ? :
Suppose that b and c are expressions that are not boolean-valued.
V is [un]assigned after a ? b : c 15.25 ) iff V is [un]assigned after b and V is
[un]assigned after c .
V is [un]assigned before a iff V is [un]assigned before a ? b : c .
V is [un]assigned before b iff V is [un]assigned after a when true.
V is [un]assigned before c iff V is [un]assigned after a when false.
16.1.7. Other Expressions of Type boolean
Suppose that e is an expression of type boolean and is not a boolean constant expression,
logical complement expression ! a , conditional-and expression a && b , conditional-or ex-
pression a || b , or conditional expression a ? b : c .
V is [un]assigned after e when true iff V is [un]assigned after e .
V is [un]assigned after e when false iff V is [un]assigned after e .
16.1.8. Assignment Expressions
Consider an assignment expression a = b , a += b , a -= b , a *= b , a /= b , a %= b , a <<= b , a
>>= b , a >>>= b , a &= b , a |= b , or a ^= b 15.26 ) .
V is definitely assigned after the assignment expression iff either:
a is V , or
Search WWH ::




Custom Search