网友您好, 请在下方输入框内输入要搜索的题目:

题目内容 (请给出正确答案)
单选题
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();


参考答案

参考解析
解析: 暂无解析
更多 “单选题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();” 相关考题
考题 In a tree directory of a file system, relative path name can be used to find files for improving directory retrieval.To do this, which directory of the followings should be set up?A.parent directoryB.child directoryC.working directoryD.home directory

考题 GiventhatfileisareferencetoaFileobjectthatrepresentsadirectory,whichcodefragmentswillsucceedinobtainingalistoftheentriesinthedirectory?() A.Vectorfilelist=((Directory)file).getList();B.String[]filelist=file.directory();C.Enumerationfilelist=file.contents();D.String[]filelist=file.list();E.Vectorfilelist=(newDirectory(file)).files();

考题 Given that the current directory is empty, and that the user has read and write privileges to the current, and the following:Which statement is true?() A.Compilation fails.B.Nothing is added to the file system.C.Only a new file is created on the file system.D.Only a new directory is created on the file system.E.Both a new file and a new directory are created on the file system.

考题 Given that the current directory is empty, and that the user has read and write permissions, and the following:Which statement is true?() A.Compilation fails.B.The file system has a new empty directory named dir.C.The file system has a new empty directory named newDir.D.The file system has a directory named dir, containing a file f1.txt.E.The file system has a directory named newDir, containing a file f1.txt.

考题 Which of the following statements is TRUE about mounting a file system?() A.A file system cannot be mounted on a directory containing data.B.Mounting a file system on a mount point containing data will delete the data.C.Mounting a file system on a amount point containing data will make the data temporarily inaccessible.D.A systems administrator must manually create an empty directory prior to mounting an AIX JFS.

考题 Given a portion of a valid Java EE web application’s directory structure: MyApp | |-- File1.html | |-- Directory1 ||-- File2.html| |-- META-INF |-- File3.html You want to know whether File1.html, File2.html, and/or File3.html will be directly accessible by your webclient’s browsers. Which statement is true?()A、All three files are directly accessible.B、Only File1.html is directly accessible.C、Only File2.html is directly accessible.D、Only File3.html is directly accessible.E、Only File1.html and File2.html are directly accessible.

考题 Which of the following commands changes a file characteristic so that it cannot be seen with astandard directory query? ()A、attrib file.txt +hB、attrib file.txt +rC、ren file.txtD、attrib file.txt +s

考题 How can a directory be excluded from a mksysb backup()A、Put an entry in the /etc/exclude.rootvg file.B、Put an entry in the /etc/mksysb.exclude file.C、Remove the directory’s entry from the mksysb /image.data file.D、Remove the directory’s entry from the /var/adm/ras/bosinst.data file.

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

考题 Given a correctly compiled class whose source code is:  package com.sun.sjcp;  public class Commander {  public static void main(String[] args) {  // more code here  }  }  Assume that the class file is located in /foo/com/sun/sjcp/, the current directory is /foo/, and that the classpath contains “.“ (current directory). Which command line correctly runs Commander?() A、 java CommanderB、 java com. sim. sjcp.CommanderC、 java com/sun/sjcp/CommanderD、 java -cp com.sun.sjcp CommanderE、 java -cp com/sun/sjcp Commander

考题 After a merger with another small business, your company has inherited a legacy WAR file but the originalsource files were lost. After reading the documentation of that web application,you discover that the WARfile contains a useful tag library that you want to reuse in your own webapp packaged as a WAR file. What do you need to do to reuse this tag library?()A、Simply rename the legacy WAR file as a JAR file and place it in your webapp’s library directory.B、Unpack the legacy WAR file, move the TLD file to the META-INF directory, repackage the whole thingas a JAR file, and place that JAR file in your webapp’s library directory.C、Unpack the legacy WAR file, move the TLD file to the META-INF directory, move the class files to thetop-level directory, repackage the whole thing as a JAR file, and place that JAR file in your webapp’slibrary directory.D、Unpack the legacy WAR file, move the TLD file to the META-INF directory, move the class files to thetop-level directory, repackage the WAR, and place that WAR file in your webapp’s WEB-INF directory.

考题 Which gets the name of the parent directory file “file.txt”?()A、 String name= File.getParentName(“file.txt”);B、 String name= (new File(“file.txt”)).getParent();C、 String name = (new File(“file.txt”)).getParentName();D、 String name= (new File(“file.txt”)).getParentFile();E、 Directory dir=(new File (“file.txt”)).getParentDir();  String name= dir.getName();

考题 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();

考题 10. class MakeFile {  11. public static void main(String[] args) {  12. try {  13. File directory = new File(”d”);  14. File file = new File(directory,”f”);  15. if(!file.exists()) {  16. file.createNewFile();  17. }  18. } catch (IOException e) {  19. e.printStackTrace  20. }  21. }  22. }  The current directory does NOT contain a directory named “d.” Which three are true?()A、 Line 16 is never executed.B、 An exception is thrown at runtime.C、 Line 13 creates a File object named “d”.D、 Line 14 creates a File object named “f‟.E、 Line 13 creates a directory named “d” in the file system.F、 Line 16 creates a directory named “d” and a file “f”  within it in the file system.G、 Line 14 creates a file named "f " inside of the directory named “d” in the file system.

考题 Windows Communication Foundation (WCF) service will be hosted in Microsoft Internet Information Services (IIS).You create a new application in IIS to host this service and copy the service DLL to the bin directory of the application.You need to complete the deployment of this service to IIS. What should you do next?()A、Create an asmx file and add a @ServiceHost directive to this file. Copy the file to the root of the application directory.B、Create an .asmx file and add a @Register directive to this file. Copy the file to the bin directoyy of the application.C、Create a svc file and add a @ServiceHost directive to this file. Copy the file to the root of the application directory.D、Create a .svc file and add a @Register directive to this file. Copy the file to the bin directory of the application.

考题 单选题How can a directory be excluded from a mksysb backup()A Put an entry in the /etc/exclude.rootvg file.B Put an entry in the /etc/mksysb.exclude file.C Remove the directory’s entry from the mksysb /image.data file.D Remove the directory’s entry from the /var/adm/ras/bosinst.data file.

考题 单选题After a merger with another small business, your company has inherited a legacy WAR file but the originalsource files were lost. After reading the documentation of that web application,you discover that the WARfile contains a useful tag library that you want to reuse in your own webapp packaged as a WAR file. What do you need to do to reuse this tag library?()A Simply rename the legacy WAR file as a JAR file and place it in your webapp’s library directory.B Unpack the legacy WAR file, move the TLD file to the META-INF directory, repackage the whole thingas a JAR file, and place that JAR file in your webapp’s library directory.C Unpack the legacy WAR file, move the TLD file to the META-INF directory, move the class files to thetop-level directory, repackage the whole thing as a JAR file, and place that JAR file in your webapp’slibrary directory.D Unpack the legacy WAR file, move the TLD file to the META-INF directory, move the class files to the top-level directory, repackage the WAR, and place that WAR file in your webapp’s WEB-INF directory.

考题 多选题10. class MakeFile {  11. public static void main(String[] args) {  12. try {  13. File directory = new File(”d”);  14. File file = new File(directory,”f”);  15. if(!file.exists()) {  16. file.createNewFile();  17. }  18. } catch (IOException e) {  19. e.printStackTrace  20. }  21. }  22. }  The current directory does NOT contain a directory named “d.” Which three are true?()ALine 16 is never executed.BAn exception is thrown at runtime.CLine 13 creates a File object named “d”.DLine 14 creates a File object named “f‟.ELine 13 creates a directory named “d” in the file system.FLine 16 creates a directory named “d” and a file “f”  within it in the file system.GLine 14 creates a file named f inside of the directory named “d” in the file system.

考题 单选题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;  }

考题 单选题Given that the current directory is empty, and that the user has read and write privileges to the current directory, and the following: Which statement is true?()A Compilation fails.B Nothing is added to the file system.C Only a new file is created on the file system.D Only a new directory is created on the file system.E Both a new file and a new directory are created on the file system.

考题 单选题Which gets the name of the parent directory file “file.txt”?()A  String name= File.getParentName(“file.txt”);B  String name= (new File(“file.txt”)).getParent();C  String name = (new File(“file.txt”)).getParentName();D  String name= (new File(“file.txt”)).getParentFile();E  Directory dir=(new File (“file.txt”)).getParentDir();  String name= dir.getName();

考题 单选题Which of the following statements is TRUE about mounting a file system?()A A file system cannot be mounted on a directory containing data.B Mounting a file system on a mount point containing data will delete the data.C Mounting a file system on a amount point containing data will make the data temporarily inaccessible.D A systems administrator must manually create an empty directory prior to mounting an AIX JFS.

考题 单选题Given a portion of a valid Java EE web application’s directory structure: MyApp | |-- File1.html | |-- Directory1 ||-- File2.html| |-- META-INF |-- File3.html You want to know whether File1.html, File2.html, and/or File3.html will be directly accessible by your webclient’s browsers. Which statement is true?()A All three files are directly accessible.B Only File1.html is directly accessible.C Only File2.html is directly accessible.D Only File3.html is directly accessible.E Only File1.html and File2.html are directly accessible.

考题 单选题Given a portion of a valid Java EE web application’s directory structure:MyApp | |--Directory1 ||--File1.html| |--META-INF|  |--File2.html| |--WEB-INF |--File3.html You want to know whether File1.html, File2.html,and/or File3.html is protected from direct access by yourweb client’s browsers. What statement is true?()A All three files are directly accessible.B Only File1.html is directly accessible.C Only File2.html is directly accessible.D Only File3.html is directly accessible.

考题 单选题Which of the following commands changes a file characteristic so that it cannot be seen with astandard directory query? ()A attrib file.txt +hB attrib file.txt +rC ren file.txtD attrib file.txt +s

考题 单选题Windows Communication Foundation (WCF) service will be hosted in Microsoft Internet Information Services (IIS).You create a new application in IIS to host this service and copy the service DLL to the bin directory of the application.You need to complete the deployment of this service to IIS. What should you do next?()A Create an asmx file and add a @ServiceHost directive to this file. Copy the file to the root of the application directory.B Create an .asmx file and add a @Register directive to this file. Copy the file to the bin directoyy of the application.C Create a svc file and add a @ServiceHost directive to this file. Copy the file to the root of the application directory.D Create a .svc file and add a @Register directive to this file. Copy the file to the bin directory of the application.

考题 单选题What command would an operator use to move a file from the /old_dir directory to the /new_dir directory without changing the file name?()A mv /old_dir/file /new_dirB mv -p /old_dir/file /new_dirC mv -k /old_dir/file /new_dirD mv /old_dir/file /new_dir/new_file