Oracle Upgrade to Java SE 7 Programmer (1Z0-805日本語版) (1Z0-805日本語) Free Practice Test
Question 1

public class CrusherRobot {
public void walk () {}
public void positionArm (int x, int y, int z) {}
public void raiseHammer() {}
public void dropHammer() {}
}
public class GripperRobot {
public void walk() {}
public void moveArm (int x, int y, int z) {}
public void openGripper () {}
public void closeGripper() {}
}

Correct Answer: D
Question 2

String query = "SELECT ID FROM Employee"; \\ Line 1 try (Statement stmt = conn.CreateStatement()) { \\ Line 2 ResultSet rs = stmt.executeQuery(query); \\ Line 3 stmt.executeQuery ("SELECT ID FROM Customer"); \\ Line 4 while (rs.next()) { \\process the results System.out.println ("Employee ID: " + rs.getInt("ID") ); } } catch (Exception e) { system.out.println ("Error"); }

Correct Answer: B
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 3

Correct Answer: D,E
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 4

Correct Answer: D
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 5

Correct Answer: B,E
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 6

SimpleDateFormat sdf;

Correct Answer: D
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 7

class MyTask extends RecursiveTask<Integer> {
final int low;
final int high;
static final int THRESHOLD = /* . . . */
MyTask (int low, int high) { this.low = low; this.high = high; }
Integer computeDirectly()/* . . . */
protected void compute() {
if (high - low <= THRESHOLD)
return computeDirectly();
int mid = (low + high) / 2;
invokeAll(new MyTask(low, mid), new MyTask(mid, high));

Correct Answer: C,E
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 8

private static void copyContents (File source, File target) {
try {inputStream fis = new FileInputStream(source);
outputStream fos = new FileOutputStream (target);
byte [] buf = new byte [8192]; int i;
while ((i = fis.read(buf)) != -1) {
fos.write (buf, 0, i);
}
//insert code fragment here. Line **
System.out.println ("Successfully copied");
}

Correct Answer: B,C,E
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).
Question 9

public static void main (String [] args) {
Path path1 = Paths.get("D:\\sys\\asm\\.\\data\\..\\..\\mfg\\production.log");
System.out.println(path1.normalize());
System.out.println(path1.getNameCount());
}
}

Correct Answer: D
Explanation: Only visible for TestSimulate members. You can sign-up / login (it's free).