I'm new to java and trying to understand how anonymous inner classes work.
Object a = new Object(){
Object b = new Object(){
String c = "Hi!";
};
};
System.out.println( a.b.c );
When I try to run the code above, I get a 'cannot find symbol' error. Can somebody explain me why am I getting this error and how can I reference the String c.
(The reason why I am trying 'a possibly weird' thing is I wanted to organize widget handles in a hierarchical way like 'ui.menu.file.open'.)