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

Help and support on OCA OCP Java Programmer Certification Questions
1Z0-808, 1Z0-809, 1Z0-815, 1Z0-816, 1Z0-817

Moderator: admin

Post Reply
mmaryon
Posts: 1
Joined: Wed Oct 08, 2014 9:14 am
Contact:

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

Post 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?

admin
Site Admin
Posts: 10046
Joined: Fri Sep 10, 2010 9:26 pm
Contact:

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

Post by admin »

The given explanations are correct.
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.

Denyo1986
Posts: 38
Joined: Thu Jan 07, 2021 2:47 am
Contact:

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

Post by Denyo1986 »

Shouldnt the picture say "Stockquote.class" instead of "Stock.class"?

Denyo1986
Posts: 38
Joined: Thu Jan 07, 2021 2:47 am
Contact:

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

Post by Denyo1986 »

ahhh...no I got it....forget it :)

Post Reply

Who is online

Users browsing this forum: No registered users and 57 guests