About Question enthuware.ocpjp.v7.2.1583 :

All the posts and topics that contain only an error report will be moved here after the error is corrected. This is to ensure that when users view a question in ETS Viewer, the "Discuss" button will not indicate the presence of a discussion that adds no value to the question.

Moderators: Site Manager, fjwalraven

Post Reply
lucas91
Posts: 9
Joined: Wed Jul 17, 2013 1:02 pm
Contact:

About Question enthuware.ocpjp.v7.2.1583 :

Post by lucas91 »

Hi, Paul!
I want to ask, why

Code: Select all

File[] roots =File.listRoots();
for(File f:roots){

System.out.println(f);
}
is wrong? I tested both this and the right answer :

Code: Select all

Iterable<Path>proots = FileSystems.getDefault().getRootDirectories();
for(Path p:proots){
System.out.println(p);
}
and both ended printing the same result.

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

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

Post by admin »

You are right. This option should be marked correct as well. Fixed.

thank you for your feedback!
Paul.

Post Reply

Who is online

Users browsing this forum: No registered users and 2 guests