单选题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?()AVector filelist = ((Directory) file).getList();BString[] filelist = file.directory();CEnumeration filelist = file.contents();DString[] filelist = file.list();EVector 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();
参考解析
解析:
暂无解析
相关考题:
● (74) is a contiguous,numbered set of variables of a given base type,which can be used and passed to functions as a unit.(74) A.RecordB.ArrayC.ParameterD.File
Certkiller.com has given you the task of serializing an object and writing it to a data file using binary serialization.You need to ensure that you meet these requirements.What should you do?() A.B.C.D.
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.
Given the following router output,which configuration file will the router use at its next reload?() A.configB.clientqos.cnfC.startup-configD.running-configuration
is a contiguous, numbered set of variables of a given base type, which can be used and passed to functions as a unit.A.RecordB.ArrayC.ParameterD.File
The(72)turns the source file into an object file and the(73)turns the object file into an executable file.A.translatorB.compilerC.interpreterD.linker
Given that Thing is a class, how many objects and reference variables are created by the following code?() Thing item, stuff; item = new Thing(); Thing entity = new Thing();A、One object is createdB、Two objects are createdC、Three objects are createdD、One reference variable is createdE、Two reference variables are createdF、Three reference variables are created.
Which of the following statements are true?() A、 The equals() method determines if reference values refer to the same object.B、 The == operator determines if the contents and type of two separate objects match.C、 The equals() method returns true only when the contents of two objects match.D、 The class File overrides equals() to return true if the contents and type of two separate objects match.
The file “file.txt” exists on the file system and contsins ASCII text. Given: try { File f = new File(“file.txt”); OutputStream out = new FileOutputStream(f, true); } catch (IOException) {} What is the result?()A、 The code does not compile.B、 The code runs and no change is made to the file.C、 The code runs and sets the length of the file to 0.D、 An exception is thrown because the file is not closed.E、 The code runs and deletes the file from the file system.
Which tool in the layout model could you use to create an external boiler plate object?()A、Field B、Frame C、Button D、RectangleE、Link file
Your company has file servers located in an organizational unit named Payroll. The file servers contain payroll files located in a folder named Payroll. You create a GPO. You need to track which employees access the Payroll files on the file servers. What should you do() A、Enable the Audit object access option. Link the GPO to the Payroll organizational unit. On the file servers, configureB、Enable the Audit object access option. Link the GPO to the domain. On the domain controllers, configure Auditing fC、Enable the Audit process tracking option. Link the GPO to the Domain Controllers organizational unit. On the file seD、Enable the Audit process tracking option. Link the GPO to the Payroll organizational unit. On the file servers, config
You administer a SQL Server 2008 instance. You plan to deploy a new database to the instance. The database will be subject to frequent inserts and updates. The database will have multiple schemas. One of the schemas will contain a large amount of read-only reference data. You need to design the physical database structure for optimal backup performance. What should you do?() A、Create the database by using a single data file and a single log file.B、Create the database by using a single data file and multiple log files.C、Create the database by using a single log file and multiple filegroups.D、Create the database by using a single log file and a filegroup that has multiple data files.
You are developing an application to create a new file on the local file system.You need to define specific security settings for the file. You must deny the file inheritance of any default security settings during creation.What should you do?()A、Create the file by using a new FileStream object by passing the FileSecurity object as a parameter to the FileStream constructor.B、Create a new FileSecurity object.C、Apply the permissions by using the File class.D、Create a new FileSystem Access Rule object for each permission that you need,and add each rule to the FileSecurity object.E、Create a new FileSystem Audit Rule object and add it to the FileSecurity object.
单选题You are creating a sales data template and need to add a picture to the margin. What is the best way to add this margin?()AChoose the margin code in the object navigator and select file-import-image. BChoose the margin node in the object navigator and use the tool bar button. CClick the margin button in the layout model and select file-import-image. DClick the margin button in the layout model and use the tool bar button.
单选题The file “file.txt” exists on the file system and contsins ASCII text. Given: try { File f = new File(“file.txt”); OutputStream out = new FileOutputStream(f, true); } catch (IOException) {} What is the result?()A The code does not compile.B The code runs and no change is made to the file.C The code runs and sets the length of the file to 0.D An exception is thrown because the file is not closed.E The code runs and deletes the file from the file system.
单选题Your company has file servers located in an organizational unit named Payroll. The file servers contain payroll files located in a folder named Payroll. You create a GPO. You need to track which employees access the Payroll files on the file servers. What should you do()AEnable the Audit object access option. Link the GPO to the Payroll organizational unit. On the file servers, configure Auditing for the Everyone group in the Payroll folder.BEnable the Audit object access option. Link the GPO to the domain. On the domain controllers, configure Auditing for the Authenticated Users group in the Payroll folder.CEnable the Audit process tracking option. Link the GPO to the Domain Controllers organizational unit. On the file servers, configure Auditing for the Authenticated Users group in the Payroll folder.DEnable the Audit process tracking option. Link the GPO to the Payroll organizational unit. On the file servers, configure Auditing for the Everyone group in the Payroll folder.
单选题Which statements are true, given the code new FileOutputStream("data", true) for creating an object of class FileOutputStream?()AFileOutputStream has no constructors matching the given arguments.BAn IOExeception will be thrown if a file named data already exists.CAn IOExeception will be thrown if a file named data does not already exist.DIf a file named data exists, its contents will be reset and overwritten.EIf a file named data exists, output will be appended to its current contents.
多选题You are developing an application to create a new file on the local file system.You need to define specific security settings for the file. You must deny the file inheritance of any default security settings during creation.What should you do?()ACreate the file by using a new FileStream object by passing the FileSecurity object as a parameter to the FileStream constructor.BCreate a new FileSecurity object.CApply the permissions by using the File class.DCreate a new FileSystem Access Rule object for each permission that you need,and add each rule to the FileSecurity object.ECreate a new FileSystem Audit Rule object and add it to the FileSecurity object.
单选题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?()AAll three files are directly accessible.BOnly File1.html is directly accessible.COnly File2.html is directly accessible.DOnly File3.html is directly accessible.EOnly File1.html and File2.html are directly accessible.
单选题Which tool in the layout model could you use to create an external boiler plate object?()AField BFrame CButton DRectangleELink file
多选题Given that Thing is a class, how many objects and reference variables are created by the following code?() Thing item, stuff; item = new Thing(); Thing entity = new Thing();AOne object is createdBTwo objects are createdCThree objects are createdDOne reference variable is createdETwo reference variables are createdFThree reference variables are created.
多选题Which of the following statements are true?()AThe equals() method determines if reference values refer to the same object.BThe == operator determines if the contents and type of two separate objects match.CThe equals() method returns true only when the contents of two objects match.DThe class File overrides equals() to return true if the contents and type of two separate objects match.
单选题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?()AAll three files are directly accessible.BOnly File1.html is directly accessible.COnly File2.html is directly accessible.DOnly File3.html is directly accessible.
多选题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.
单选题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.