A) Will this example run ?
public class MyClass{
public void aMethod(Event e){
new ActionLister(Event e){
// some line here
}
}
}
B) I'm reading several notes about inner classes (aside from the
Java Certification book by Heller and Roberts) and now, I'm pretty much confused.
From the book, I thought there were 2 types of inner classes -- member inner class or inner class (those declared inside a method / block). The latter (which is inner class) can be anonymous or not.
So, when I read this guy's notes (see #21 in
http://www.geocities.com/SiliconValley/Network/3693/obj_sec6.html#obj19 ), he says there are 4 types -- Nested top-level classes, Member classes, Local classes, Anonymous classes.
1. What's the difference between the nested top-level classes from the member classes?
2. Can member inner classes be anonymous?
I apologize if I keep posting my questions. I'm studying by chapter and I do not want to move on without fully understanding this one.
Pls help. Thank you in advance.
[ September 01, 2005: Message edited by: Ivy Kho ]