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;  }

时间:2022-10-07 18:22:16 所属题库:SCJP程序员认证考试题库

相似题目