1Z1-805 試験問題を無料オンラインアクセス
試験コード: | 1Z1-805 |
試験名称: | Upgrade to Java SE 7 Programmer |
認定資格: | Oracle |
無料問題数: | 90 |
更新日: | 2025-09-10 |
Given the incomplete pseudo-code for a fork/join framework applications:
submit (Data) { if (Data.size < SMALL_ENOUGH) { _________(Data); // line X } else { List<Data> x = _________________(Data); // line Y for(Data d: x ______________(d); // line Z } }
And give the missing methods:
Process, submit, and splitInHalf
Which three insertions properly complete the pseudo-code?
Given:
import java.io.*;
public class SampleClass {
public static void main(String[] args) throws IOException {
try {
String dirName = args[0];
File dir = new File(dirName);
File.createTempFile("temp", "log", dir);
} catch (NullPointerException | IOException e) {
e = new IOException("Error while creating temp file");
throw e;
}
}
}
What is the result?
Given the code fragment:
public static void main(String[] args) {
String source = "d:\\company\\info.txt";
String dest = "d:\\company\\emp\\info.txt";
//insert code fragment here Line **
} catch (IOException e) {
System.err.println ("Caught IOException: " + e.getmessage();
}
}
Which two try statements, when inserted at line **, enable the code to successfully move the file info.txt to the destination directory, even if a file by the same name already exists in the destination directory?
Given:
public class DAOManager {
public AccountDAO getAccountDAO() {
return new AccountJDBCDAO();
}
}
Which design pattern best describes the class?