试题详情
单项选择题Given that file is a reference to a File object that represents a directory, which code fragments will succeed in obtaining a list of the entries in the directory?()  

A、Vector filelist = ((Directory) file).getList();

B、String[] filelist = file.directory();

C、Enumeration filelist = file.contents();

D、String[] filelist = file.list();

E、Vector filelist = (new Directory(file)).files();

  • D
  • 关注下方微信公众号,在线模考后查看

热门试题