Gayatri, The declaration of a member class is directly enclosed within the declaration of an interface or within another class. The term "directly" means that a member class declaration is not nested within something else that is enclosed by the enclosing class. An annonymous class declaration is really a class instance creation expression that ends with an optional class body. In other words, an annonymous class declaration is an expression and that expression must appear within a statement and the statement could appear within a method, constructor, etc. For those reasons, it would be difficult to argue that an anonymous class should be considered a member class.
Dan Chisholm<br />SCJP 1.4<br /> <br /><a href="http://www.danchisholm.net/" target="_blank" rel="nofollow">Try my mock exam.</a>
posted 16 years ago
A "dutch baby" is not a baby. But this tiny ad is baby sized: