Phillip Lord wrote:
>
> I have a file with the following construction in it
>
> public final int ord;
>
> protected Constructor()
> {
>
> ord = 10;
> }
>
> which is perfectly legal java. Sadly due to a bug in Javac
> is will not compile, instead telling me that I have to initialise
> finals in the constructor (even though I have).
Are you sure your code is correct? What you have described compiles for
me (java version "1.2.2" Classic VM (build JDK-1.2.2_007, native
threads, symcjit)) :
Source file -------------------------
public class Junk
{
public final int ord;
protected Junk() {
ord = 10;
}
}
-------------------------------------
c:\Project\provisioning\src\bss\util>javac -verbose Junk.java
javac -verbose Junk.java
[parsed Junk.java in 420 ms]
[loaded C:\java\jdk1.2.2\jre\lib\rt.jar(java/lang/Object.class) in 30
ms]
[checking class bss.util.Junk]
[wrote Junk.class]
[done in 812 ms]
-------------------------------------
Kevin Mukhar