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
答案解析:有
微信扫一扫手机做题