Class0.java:18: inner classes cannot have static declarations
private static final Object aa;
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.