Page 1 of 1

About Question enthuware.ocajp.i.v7.2.1066 :

Posted: Wed Oct 08, 2014 9:22 am
by mmaryon
I find that the answer to this question is very subjective. It makes more sense to me to import com.enthu.* than to import com.*. With the second import statement, you're potentially importing more packages that have no relevance to your code than if you imported the first one. The reasoning for why the first import is incorrect is also misleading, because although you're not using any of the classes directly in that package, you are using a package within enthu, namely rad. Am I missing something? Does the wildcard marker cause the import statement to recursively import subpackages?

Re: About Question enthuware.ocajp.i.v7.2.1066 :

Posted: Wed Oct 08, 2014 11:58 am
by admin
The given explanations are correct.
Wild card does not import packages recursively. It only imports the classes in a package.

HTH,
Paul.

Re: About Question enthuware.ocajp.i.v7.2.1066 :

Posted: Fri Jan 08, 2021 12:54 pm
by Denyo1986
Shouldnt the picture say "Stockquote.class" instead of "Stock.class"?

Re: About Question enthuware.ocajp.i.v7.2.1066 :

Posted: Fri Jan 08, 2021 12:57 pm
by Denyo1986
ahhh...no I got it....forget it :)