Originally posted by Srikanth Ramu:
Imports can be of 2 types...
For more details refer:
http://java.sun.com/docs/books/jls/second_edition/html/packages.doc.html#70209
That link is to the old second edition of the JLS. The
third edition introduced static imports, so there are now
four types of import statements...
7.5.1 Single-Type-Import Declaration7.5.2 Type-Import-on-Demand Declaration7.5.3 Single Static Import Declaration7.5.4 Static-Import-on-Demand DeclarationAddressing the original question,
JLS - 7.5 Import Declarations states, "A type-import-on-demand declaration (�7.5.2) imports all the accessible (�6.6) types of a named type or package as needed." Packages are not types.
[ April 24, 2007: Message edited by: marc weber ]