|
|
|||||||||
|
|||||||||
| |||||||||
|
|
|
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Rate Thread | Display Modes |
|
#1
|
|||
|
|||
|
When using the import command, I've seen statements like the following:
import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; If the * sign indicates to import everything below the import.javax.servlet.jsp classes, why do they have to also put another line below to import everything under the javax.servlet.jsp.tagext.* as well? Shouldn't that be included in the first import, since the * sign was used to indicate everything under the jsp directory, including jsp.tagext.*? Do java programmers do this just for ilustration purposes so whoever looks at the code knows they are using something from the tagext directory? or is is really neccessary to include the second line? I am confused.... ![]() |
|
#2
|
|||
|
|||
|
First, I'm not 100% sure of my explanation, it's just what I think the reason is. I'm not a Java programmer.
If you only use import javax.servlet.jsp.*; then afterwards you want to use foobar which is in tagext, you'll need to use tagext.foobar blahblah But if you do: import javax.servlet.jsp.*; import javax.servlet.jsp.tagext.*; You can simply use: foobar blahblah Get it? Again, I'm not sure of this, maybe someone can confirm it? edit: some -> someone (sometimes my head thinks one thing, and my fingers type another )
__________________
Disclaimer: the owner of this post is NOT responsible for any moral and/or physical damage this post could cause to you. Last edited by Ludootje : February 7th, 2004 at 05:17 AM. |
|
#3
|
|||
|
|||
|
Thanks a lot !!!
I got it now |
![]() |
| Viewing: Dev Shed Forums > Other > Beginner Programming > Question about java |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|