Community
Participate
Working Groups
The following class won't compile: public class Outer { public final static Outer cOuter = new Outer(); public static class Inner { public static final String mInnerAttribute = "test"; } public static void main(String[] args) { System.out.println(Outer.cOuter.Inner.mInnerAttribute); } }
In JDK 1.41, this test fails with: Outer.java:10: unexpected type required: class, package found : variable System.out.println(Outer.cOuter.Inner.mInnerAttribute); ^ 1 error
Question from Nils in email: Do you know if this is a new feature of JDK 1.4? The code compiles for JDK 1.3. No I don't know offhand... but I suspect it was a bug fix put into JDK 1.4.1. I doubt we'll change our 1.3 behaviour to match JDK 1.3 since JDK 1.4.1 has changed.
JDK1.3 had numerous bugs which got fixed in 1.4.1. Usually we follow 1.4.1 unless it breaks JCK 1.3 certification.
Ok to close?
Yes close it.
Closing