Welcome to the Ranch Pallavi, Chris and Dan.
__________________________________________________________________
This is from JLS 15.9
ClassInstanceCreationExpression:
new ClassOrInterfaceType ( ArgumentListopt ) ClassBodyopt
Primary.new Identifier ( ArgumentListopt ) ClassBodyopt
Class instance creation expressions have two forms:
* Unqualified class instance creation expressions begin with the keyword new. An unqualified class instance creation expression may be used to create an instance of a class, regardless of whether the class is a top-level (�7.6), member (�8.5, �9.5), local (�14.3) or anonymous class (�15.9.5).
* Qualified class instance creation expressions begin with a Primary. A qualified class instance creation expression enables the creation of instances of inner member classes and their anonymous subclasses.
And from JLS 15.9.1
Otherwise, the class instance creation expression is a qualified class instance creation expression. It is a compile-time error if Identifier is not the simple name (�6.2) of an accessible (�6.6) non-abstract inner class (�8.1.2) T that is a member of the compile-time type of the Primary. It is also a compile-time error if Identifier is ambiguous (�8.5). The class being instantiated is the class denoted by Identifier.
Thus it seems that the compiler is getting more and more JLS compliant.
[ November 12, 2003: Message edited by: Jose Botella ]