Re: final variables in constructors (OT)

1999-07-17 Thread Kontorotsui
Ok, if declared as final and static, variables behave just like constants and can be used in constructors. I don't know how it happened the first time that it didn't work, but after another test it's confirmed, they work. With an afterthough, it would have been a big mistake in the java languag

Re: final variables in constructors (OT)

1999-07-16 Thread Nick Lawson
The java language specification is a little difficult to follow on final static fields. The best place to look is 13.4.8 - Binary Compatability. This says "We call a field that is static, final, and initialized with a compile-time constant expression a primitive constant." and it is impl

Re: final variables in constructors (OT)

1999-07-16 Thread Chris Abbey
At 11:05 AM 7/16/99 +0200, Kontorotsui wrote: > >On 14-Jul-99 Michael Sinz wrote: >> The reason is that until the constructor is called, no instance data >> can be used. Note that you did not make this static final but rather >> final. This means there must be actual instance data to access this