1Z1-805 무료 덤프문제 온라인 액세스

시험코드:1Z1-805
시험이름:Upgrade to Java SE 7 Programmer
인증사:Oracle
무료 덤프 문항수:90
업로드 날짜:2026-08-20
평점
100%

문제 1

Given:
class Fibonacci extends RecursiveTask<Integer> {
final int n;
Fibonacci (int n) { this.n = n }
Integer compute () {
if (n <= 1)
return n;
Fibonacci f1 = new Fibonacci (n - 1);
f1.fork; // Line X
Fibonacci f2 = new Fibonacci (n - 2); // Line Y
return f2.compute() + f1.join;
}
}
Suppose that lines X and Y are transposed:
Fibonacci f2 = new Fibonacci (n - 2); // Line Y
f1.fork; // Line X
What is the likely result?

문제 2

Given the following incorrect program:
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));
Which two changes make the program work correctly?

문제 3

Given the code fragment:
public static void processFile () throws IOException { Try (FileReader fr = new FileReader ("logfilesrc.txt");
FileWriter fw = new FileWriter ("logfilesdst.txt") ) {
int i = fr.read();
}
}
Which statement is true?

문제 4

Given the code fragment:
public static void main(String[] args) { Path dir = Paths.get("d:\\company");
// insert code here. Line **
for (Path entry: stream) {
System.out.println(entry.getFileName());
}
} catch (IOException e) {
System.err.println("Caught IOException: " + e.getMessage());
}
}
Which two try statements, when inserted at line 11, enable you to print files with the extensions.java, .htm, end and .jar.

문제 5

Given the code fragment:
/* method declaration */ { try {
String className = "java.lang.String";
String fieldname = "somefield";
Class c = Class.forName(className);
Field f = c.getField(fieldname);
} catch(Exception e) {
e.printStackTrace();
throw e;
}
}
Which two method declarations are valid options to replace /* method declaration */?

댓글 추가

귀하의 메일주소는 공개되지 않습니다. 필수 입력 사항은 표시되어 있습니다. *

insert code
그림의 인증번호를 입력하세요.