About Question enthuware.ocpjp.v7.2.1095 :

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

Moderator: admin

Post Reply
Alexey Berezkin
Posts: 20
Joined: Fri Jun 19, 2015 9:17 am
Contact:

About Question enthuware.ocpjp.v7.2.1095 :

Post by Alexey Berezkin »

Option 2 requires moving A.java file to another directory whereas a question only offers inserting something to a line 1.

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

Re: About Question enthuware.ocpjp.v7.2.1095 :

Post by admin »

No, you can keep a java file anywhere you want. There is no need to move it. It is the class file that has to be in a certain directory (as per the package).
If you like our products and services, please help us by posting your review here.

Alexey Berezkin
Posts: 20
Joined: Fri Jun 19, 2015 9:17 am
Contact:

Re: About Question enthuware.ocpjp.v7.2.1095 :

Post by Alexey Berezkin »

Well, but if there is no package declaration then the default package is implied, and when you add a package declaration, say, package a.b, the file must be moved to a/b subdirectory of initial location. Or, you have to update your compilation options so that the A.java now can be found in a/b relative to sources dir. Anyway, when you change package declaration in a source you have to update yet another thing, either files structure or your pom.xml or build.xml or alike. Have you got my point now?

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

Re: About Question enthuware.ocpjp.v7.2.1095 :

Post by admin »

Yes, I got your point but which tools and utilities you use is not Java's resposibility. The restrictions that you have mentioned are imposed by third party tools, not by Java. As far as Java is concerned, your source file can be anywhere. It doesn't care. It cares only about the class file.
If you like our products and services, please help us by posting your review here.

Post Reply

Who is online

Users browsing this forum: No registered users and 11 guests