This below code is from Khalid's (Page No 311).I'am trying to understand what are the accessible declarations in anonymous class which extends Base.So I have added some printout statements to check out what variables are accessed and how.But somehow, I'am not able to compile the program.Can you please correct the code.
Your System.out.println statements are in the anonymous class body definition. They need to be in a method.
(I know it looks like a method, but you're actually calling the Base constructor, then slipping in a class definition with the braces. So the braces represent a class body -- not a method body.) [ September 24, 2004: Message edited by: marc weber ]
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org