Whichdeterminesif“prefs”isadirectoryandexistsonthefilesystem?()A.Booleanexists=Directory.exists(“prefs”);B.Booleanexists=(newFile(“prefs”)).isDir();C.Booleanexists=(newDirectory(“prefs”)).exists();D.Booleanexists=(newFile(“prefs”)).isDirectory();E.Boolean

题目
Whichdeterminesif“prefs”isadirectoryandexistsonthefilesystem?()

A.Booleanexists=Directory.exists(“prefs”);

B.Booleanexists=(newFile(“prefs”)).isDir();

C.Booleanexists=(newDirectory(“prefs”)).exists();

D.Booleanexists=(newFile(“prefs”)).isDirectory();

E.Booleanexists=true;Try{Directoryd=newDirectory(“prefs”);} catch(FileNotFoundExceptione){exists=false;}


相似考题