16.2. Definite Assignment and Statements

16.2.1. Empty Statements

V is [un]assigned after an empty statement (§14.6) iff it is [un]assigned before the empty statement.

16.2.2. Blocks

• A blank final member field V is definitely assigned (and moreover is not definitely unassigned) before the block (§14.2) that is the body of any method in the scope of V and before the declaration of any class declared within the scope of V.

• A local variable V is definitely unassigned (and moreover is not definitely assigned) before the block that is the body of the constructor, method, instance initializer or static initializer that declares V.

• Let C be a class declared within the scope of V. Then V is definitely assigned before the block that is the body ...

Get The Java® Language Specification, Java SE 7 Edition, Fourth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.