최신Oracle Java SE 8 Programmer I - 1z0-808무료샘플문제
문제1
Given the code fragments:

Which code fragment, when inserted at line n1, enables the code to print Hank?
Given the code fragments:

Which code fragment, when inserted at line n1, enables the code to print Hank?
정답: C
설명: (KoreaDumps 회원만 볼 수 있음)
문제2
Which statement will emoty the contents of a StringBuilder variable named sb?
Which statement will emoty the contents of a StringBuilder variable named sb?
정답: D
문제3
Given the code fragment:

What is the result?
Given the code fragment:

What is the result?
정답: A
문제4
Given:

What is the result?
Given:

What is the result?
정답: D
문제5
Given the code fragment:

What is the result?
Given the code fragment:

What is the result?
정답: B
문제6
Given the following four Java file definitions:
// Foo.java
package facades;
public interface Foo { }
// Boo.java
package facades;
public interface Boo extends Foo { }
// Woofy.java
package org.domain
// line n1
public class Woofy implements Boo, Foo { }
// Test.java
package.org;
public class Test {
public static void main(String[] args) {
Foo obj=new Woofy();
Which set modifications enable the code to compile and run?
Given the following four Java file definitions:
// Foo.java
package facades;
public interface Foo { }
// Boo.java
package facades;
public interface Boo extends Foo { }
// Woofy.java
package org.domain
// line n1
public class Woofy implements Boo, Foo { }
// Test.java
package.org;
public class Test {
public static void main(String[] args) {
Foo obj=new Woofy();
Which set modifications enable the code to compile and run?
정답: C
문제7
Given:

and the code fragment:

What is the result?
Given:

and the code fragment:

What is the result?
정답: B
설명: (KoreaDumps 회원만 볼 수 있음)
문제8
Which statement is true about the main() method?
Which statement is true about the main() method?
정답: D
설명: (KoreaDumps 회원만 볼 수 있음)
문제9
Given:
public class Test {
public static void main(String[] args) {
int arr[] = new int[4];
arr[0] = 1;
arr[1] = 2;
arr[2] = 4;
arr[3] = 5;
int sum = 0;
try {
for (int pos = 0; pos <= 4; pos++) {
sum = sum + arr[pos];
}
} catch (Exception e) {
System.out.println("Invalid index");
}
System.out.println(sum);
}
}
What is the result?
Given:
public class Test {
public static void main(String[] args) {
int arr[] = new int[4];
arr[0] = 1;
arr[1] = 2;
arr[2] = 4;
arr[3] = 5;
int sum = 0;
try {
for (int pos = 0; pos <= 4; pos++) {
sum = sum + arr[pos];
}
} catch (Exception e) {
System.out.println("Invalid index");
}
System.out.println(sum);
}
}
What is the result?
정답: D
설명: (KoreaDumps 회원만 볼 수 있음)
문제10
Given:
public class CheckIt {
public static void main (String[] args) {
if (doCheck()) {
System.out.print("square ");
}
System.out.print("...");
}
public static int doCheck() {
return 0;
}
}
Given:
public class CheckIt {
public static void main (String[] args) {
if (doCheck()) {
System.out.print("square ");
}
System.out.print("...");
}
public static int doCheck() {
return 0;
}
}
정답: C
문제11
Given the code fragment:

What is the result?
Given the code fragment:

What is the result?
정답: A
설명: (KoreaDumps 회원만 볼 수 있음)
문제12
Given the code fragment:

Which code fragment, when inserted at line n1, enables the App class to print Equal?

Given the code fragment:

Which code fragment, when inserted at line n1, enables the App class to print Equal?

정답: A
문제13
Given the code fragment:

What is the result?
Given the code fragment:

What is the result?
정답: A
문제14
Examine the content of App.java:

Which is true?
Examine the content of App.java:

Which is true?
정답: D