fred rosenberger wrote:Someone here COULD...
You think? I'm not sure
I could answer that one definitively. Or at least not without a lot of JLS trawling.
@phooton: And the reason is that it
just doesn't matter. If the field
wasn't final it might, or if you're doing something so tortuous that knowing precisely
when everything is done in the construction phase of a Java object is essential knowledge; but in 99.99[999]% of the cases, it doesn't. And in those that it does, it's probably
bad design.
Java is not C or C++, and with good reason. It is a
memory-managed language, and that means that you leave it up to the JVM and the garbage-collector to deal with memory; you initialize variables
eagerly (if required); and basically, you don't leave
anything up to the whims of a complex construction algorithm that you have absolutely NO control over.
Old proverb: An ounce of prevention is worth a pound of cure.
Winston