Author Topic:   Static Inner Class
Alkesh Nandanwar
ranch hand
posted March 19, 2000 01:17 AM             
[CODE]
hi
Static methods can not access the instance fields, but can static inner class(AKA top level inner class)access the instance fields of the containing class?
[\CODE]

Jane Rozen
ranch hand
posted March 19, 2000 03:01 PM             
No, because static inner class is not assosiated with any INSTANCE of the containing class,so it does NOT have a reference to the outer class OBJECT. It has access only to STATIC members of the containing class.

maha anna
bartender
posted March 19, 2000 03:03 PM             
Alkesh,
These are all can easily checked by writing a very small program and testing. Please do that. If you still have doubt after testing, tell us what you think and why? We are ready to help. I hope you take it in the right sprit. Why I say this is if you check these concepts by this way you needn't remember the answers. You can answer confidently even if the qstns are twisted.
regds
maha anna

|