Class0.java:18: inner classes cannot have static declarations
private static final Object aa;
Now, now, that is hardly a "nice" way to talk. Please look at this.
Gasan Gouseinov wrote:Ankit, I know what the compile time constant is, ok?
Gasan Gouseinov wrote:Ernest, I don't clearly understand what you mean by saying that compile time static members constants treated as a macros. But, you're right, in other words, only string or number literals can be static member constants for anonymous inner class (probably for all inner classes, but I don't know).
Gasan Gouseinov wrote:what I'm trying to say is that is legal to have static member in inner anonymous class only of primitive type or String type, but only of them. Why?!
Gasan Gouseinov wrote:I didn't found the best solution for this. Probably, it's to add methods for that fields, which will initialize them if they wasn't.