试题详情
- 单项选择题Which determines if “prefs” is a directory and exists on the file system?()
A、 Boolean exists=Directory.exists (“prefs”);
B、 Boolean exists=(new File(“prefs”)).isDir();
C、 Boolean exists=(new Directory(“prefs”)).exists();
D、 Boolean exists=(new File(“prefs”)).isDirectory();
E、 Boolean exists=true; Try{ Directory d = new Directory(“prefs”); } catch (FileNotFoundException e) { exists = false; }
- D
关注下方微信公众号,在线模考后查看
热门试题