hi all,
my question is related to anonymous (unnamed) classes.
Anonymous classes are always sub-class of the some "new ClassName()". so my question is that if it is always sub-class of some class and if it is define the method that is already defined in super class then it is overriding the method. or we can say that it is by default follow the overriding principle.
I need your thoughts on this Topic.
Example Attached from SCJP Kathy Siera Book.
The Popcorn reference variable refers not to an instance of Popcorn, but to an
instance of an anonymous (unnamed) subclass of Popcorn.
Let's look at just the anonymous class code:
Regards,
Mahendra Athneria
Mumbai- India
[Nitesh: Added code tags. Please
UseCodeTags]