試卷測驗 - 104 年 - SCJP 151-200#99330-阿摩線上測驗
邱振盛剛剛做了阿摩測驗,考了2分
151.
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.
153. Chain these constructors to create objects to read from a file named "in" and to write to a file named "out".
155. The doesFileExist method takes an array of directory names representing a path from the root filesystem and a file name. The method returns true if the file exists, false if it does not. Place the code fragments in position to complete this method.
156. Place the code fragments into position to use a BufferedReader to read in an entire text file.
176. Place the code fragments into position to produce the output: true true false
Code
Scanner scanner = new Scanner("One,5,true,3,true,6,7,false'');
scanner.useDelimiter(",");
179. Place the Relations on their corresponding Implementation Structures. Note Not all Implementation Structures will be used.
180. Place the correct description of the compiler output on the code fragments to be inserted at lines 4 and 5. The same compiler output may be used more than once.
181. Place code into the class so that it compiles and generates the output answer = 42. Note: Code options may be used more than once.
183. Place the code in the appropriate places such that this program will always output [1, 2].