well I think anonymous inner classes are created by extending the class u are instantiating and if u define any method that cannot be accessed by the reference type then u cant call the method due to the fact that at compile time the methods that can be called on an object is being determined by the reference type.
Da Clone in programming world
Joined: Mar 09, 2006
Thanks for the clarifications. So we can create reference variables for the class or interface we are extending while creating anonymous inner classes. and the method iam writing inside the anonymous inner class are the ones defined in these extending class or interface. In other words i can only override the methods of the extending class or interface? and cannot write any other new methods not defined in the parent class or interface iam extending?