Hi,
Thanks a lot for your reply.
I was guessing that when we create an anonymous class in static context. The anonymous class also implicitly gets the status of being static and in this situation the static reference can refer to this anonymous class.
But I tried writing code, where an anonymous class in non-static context is refered by a static reference & obviously it didnt work.
So I am still confused ?
And theres one more question related to this.
Local & anonymous classes cannot be marked as static but they can be created in static context & then they are implicitly static.
So why is that constraint ?
Would be great if someone can throw some light on this
Thanks