Re: Initializing variable style question
- From: Philipp <djbulu@xxxxxxxxx>
- Date: Fri, 14 Nov 2008 10:37:36 -0800 (PST)
On Nov 14, 6:03 pm, Eric Sosman <Eric.Sos...@xxxxxxx> wrote:
In this situation, the "useless" intialization to zero must in fact
be performed if the program is to operate as the JLS requires. (Of
course, calling an overridable method from a constructor is firmly
in the Don't Do That realm.)
Wow. Thanks for that example which makes the point clear.
Phil
PS: I'm still a bit disapointed that my neither the javac nor the JIT
removed the self-assignments in my example, but then again, maybe they
are also necessary to guarantee execution by the specs.
.
- Follow-Ups:
- Re: Initializing variable style question
- From: Eric Sosman
- Re: Initializing variable style question
- References:
- Initializing variable style question
- From: Nicros
- Re: Initializing variable style question
- From: Nicros
- Re: Initializing variable style question
- From: Lew
- Re: Initializing variable style question
- From: Philipp
- Re: Initializing variable style question
- From: Peter Duniho
- Re: Initializing variable style question
- From: Lew
- Re: Initializing variable style question
- From: Philipp
- Re: Initializing variable style question
- From: Lew
- Re: Initializing variable style question
- From: Eric Sosman
- Initializing variable style question
- Prev by Date: Re: 7.0 wishlist?
- Next by Date: Re: Initializing variable style question
- Previous by thread: Re: Initializing variable style question
- Next by thread: Re: Initializing variable style question
- Index(es):
Relevant Pages
|