Java Reference
In-Depth Information
The following rules hold within the constructors (§ 8.8.7 ) of class C :
V is definitely assigned (and moreover is not definitely unassigned) after an altern-
ate constructor invocation (§ 8.8.7.1 ).
V is definitely unassigned (and moreover is not definitely assigned) before an ex-
plicit or implicit superclass constructor invocation (§ 8.8.7.1 ) .
• If C has no instance initializers or instance variable initializers, then V is not defin-
itely assigned (and moreover is definitely unassigned) after an explicit or implicit
superclass constructor invocation.
• If C has at least one instance initializer or instance variable initializer then V is
[un]assigned after an explicit or implicit superclass constructor invocation iff V is
[un]assigned after the rightmost instance initializer or instance variable initializer
of C .
Let C be a class, and let V be a blank final member field of C , declared in a superclass of C .
Then:
V is definitely assigned (and moreover is not definitely unassigned) before the
block that is the body of a constructor or instance initializer of C .
V is definitely assigned (and moreover is not definitely unassigned) before every
instance variable initializer of C .
Search WWH ::




Custom Search