About Question enthuware.ocajp.i.v7.2.1066 :
Moderator: admin
-
- Posts: 1
- Joined: Wed Oct 08, 2014 9:14 am
- Contact:
About Question enthuware.ocajp.i.v7.2.1066 :
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?
-
- Site Admin
- Posts: 10046
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1066 :
The given explanations are correct.
Wild card does not import packages recursively. It only imports the classes in a package.
HTH,
Paul.
Wild card does not import packages recursively. It only imports the classes in a package.
HTH,
Paul.
If you like our products and services, please help us by posting your review here.
-
- Posts: 38
- Joined: Thu Jan 07, 2021 2:47 am
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1066 :
Shouldnt the picture say "Stockquote.class" instead of "Stock.class"?
-
- Posts: 38
- Joined: Thu Jan 07, 2021 2:47 am
- Contact:
Re: About Question enthuware.ocajp.i.v7.2.1066 :
ahhh...no I got it....forget it
Who is online
Users browsing this forum: No registered users and 57 guests