I tried to declare a class as below
class Outer{ private final class Inner{ public static final String s1 = new String("123"); public static final byte[] bytes = new byte[]{0x00, 0x01}; public static final String s2 = "123"; public static final byte byte1 = 0x02; } }
In the above code, s1 and bytes are not compiled, and s2 and byte1 are compiled. If I put the whole declaration in an external class, it works fine. what i'm missing. Any help?
java inner-classes constants final
Manoj
source share