We can "say, loosely, that the static keyword always marks a 'top-level' construct (variable, method, or class), which is never subject to an enclosing instance." "This shows why an inner class cannot declare a static member, because the entire body of the inner class is in the scope of one or more enclosing instances." See here - Dave
By definition EVERYTHING that the inner class has, that can be manipulated in any way (is not a constant), must be in relation to an instance of the outer class. So each outer class instance would need to have it's OWN version of the inners static member. But you can't have multiple copies of a static thing. So you just can't do it.
"JavaRanch, where the deer and the Certified play" - David O'Meara
Joined: Sep 08, 2000
Thanks Cindy and Dave. Your explaination helped me to understand the concept. regards Gaurav Mantro ------------------ http://www.mantrotech.com