Jeff Verdegan wrote:static member variable: Must be assigned at declaration or in a static initializer block.
non-static member variable: Must be assigned by the end of all paths through constructors. This means that it has to be assigned at declaration, or in an instance initializer block, or in a constructor. If one constructor invokes another one, and the variable wasn't assigned at declaration or in an initializer block, then exactly one of those constructors must initialize it.
local variable: Must be assigned before being read.
I'd add: the first two are for
final member variables only. The last is true regardless of whether a local variable is final or not.