What jdk is this question based upon?
I have 1.7.0_60 and under it there is File[] listRoots() method in FileSystem (which is also referenced in File#listRoots). There is no FileSystem#getRootDirectories() method, and yet the answer variant using it is listed as correct.
In case it is relevant, I use question bank com.enthuware.ets.ocp-jp-ii.v7 version 1.76.
About Question enthuware.ocpjp.v7.2.1583 :
Moderator: admin
-
- Posts: 3
- Joined: Wed Sep 24, 2014 7:04 am
- Contact:
-
- Site Admin
- Posts: 10053
- Joined: Fri Sep 10, 2010 9:26 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1583 :
It is there: http://docs.oracle.com/javase/7/docs/ap ... irectories()
If you like our products and services, please help us by posting your review here.
-
- Posts: 31
- Joined: Sun Oct 13, 2013 1:20 pm
- Contact:
Re: About Question enthuware.ocpjp.v7.2.1583 :
Funny:
FileSystem.getRootDirectories() returns [ C:\, D:\, E:\ ]
File.listRoots() returns { C:\, D:\ }
(E:\ is my DVD drive)
FileSystem.getRootDirectories() returns [ C:\, D:\, E:\ ]
File.listRoots() returns { C:\, D:\ }
(E:\ is my DVD drive)
Who is online
Users browsing this forum: No registered users and 51 guests