This week's book giveaway is in the Mac OS forum. We're giving away four copies of a choice of "Take Control of Upgrading to Yosemite" or "Take Control of Automating Your Mac" and have Joe Kissell on-line! See this thread for details.
javax.servlet is the parent package which contains javax.servlet.http package,then 1st line is sufficient to import both the packages,Right? then why there is a requirement to separately import javax.servlet.http package?(in the books like Complete reference there is mention of both these import statements to import javax.servlet.http package)
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 Declaration
7.5.2 Type-Import-on-Demand Declaration
7.5.3 Single Static Import Declaration
7.5.4 Static-Import-on-Demand Declaration
Addressing 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 ]
"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer sscce.org
Joined: Apr 24, 2007
Thnx guys for your informative inputs. I have joined this ranch today.I am humbled by the kind of(prompt and quality) response I got.thank you very much.