최신Oracle Java SE 8 Programmer II (1z0-809日本語版) - 1z0-809日本語무료샘플문제
문제1
コードの断片を考えると:
List<String> colors = Arrays.asList("red", "green", "yellow");
Predicate<String> test = n - > {
System.out.println("Searching...");
return n.contains("red");
};
colors.stream()
.filter(c -> c.length() > 3)
.allMatch(test);
What is the result?
コードの断片を考えると:
List<String> colors = Arrays.asList("red", "green", "yellow");
Predicate<String> test = n - > {
System.out.println("Searching...");
return n.contains("red");
};
colors.stream()
.filter(c -> c.length() > 3)
.allMatch(test);
What is the result?
정답: A
문제2
コードの断片を考えると:
List<String> listVal = Arrays.asList("Joe", "Paul", "Alice", "Tom");
System.out.println (
// line n1
);
lineに挿入されると、コードが長さが3を超える文字列要素の数を出力できるコードフラグメントはどれですか?
コードの断片を考えると:
List<String> listVal = Arrays.asList("Joe", "Paul", "Alice", "Tom");
System.out.println (
// line n1
);
lineに挿入されると、コードが長さが3を超える文字列要素の数を出力できるコードフラグメントはどれですか?
정답: C
문제3
与えられた条件:

関数インターフェースを使用してリファクタリングされたコードはどれですか?
与えられた条件:

関数インターフェースを使用してリファクタリングされたコードはどれですか?
정답: A
문제4
コードの断片を考えると:
Stream<List<String>> iStr= Stream.of (
Arrays.asList ("1", "John"),
Arrays.asList ("2", null)0;
Stream<<String> nInSt = iStr.flatMapToInt ((x) -> x.stream ());
nInSt.forEach (System.out :: print);
What is the result?
コードの断片を考えると:
Stream<List<String>> iStr= Stream.of (
Arrays.asList ("1", "John"),
Arrays.asList ("2", null)0;
Stream<<String> nInSt = iStr.flatMapToInt ((x) -> x.stream ());
nInSt.forEach (System.out :: print);
What is the result?
정답: A
문제5
Given:
class RateOfInterest {
public static void main (String[] args) {
int rateOfInterest = 0;
String accountType = "LOAN";
switch (accountType) {
case "RD";
rateOfInterest = 5;
break;
case "FD";
rateOfInterest = 10;
break;
default:
assert false: "No interest for this account"; //line n1
}
System.out.println ("Rate of interest:" + rateOfInterest);
}
}
and the command:
java -ea RateOfInterest
What is the result?
Given:
class RateOfInterest {
public static void main (String[] args) {
int rateOfInterest = 0;
String accountType = "LOAN";
switch (accountType) {
case "RD";
rateOfInterest = 5;
break;
case "FD";
rateOfInterest = 10;
break;
default:
assert false: "No interest for this account"; //line n1
}
System.out.println ("Rate of interest:" + rateOfInterest);
}
}
and the command:
java -ea RateOfInterest
What is the result?
정답: C
문제6
コードの断片を考えると:
class TechName {
String techName;
TechName (String techName) {
this.techName=techName;
}
}
and
List<TechName> tech = Arrays.asList (
new TechName("Java-"),
new TechName("Oracle DB-"),
new TechName("J2EE-")
);
Stream<TechName> stre = tech.stream();
//line n1
Which should be inserted at line n1 to print Java-Oracle DB-J2EE-?
コードの断片を考えると:
class TechName {
String techName;
TechName (String techName) {
this.techName=techName;
}
}
and
List<TechName> tech = Arrays.asList (
new TechName("Java-"),
new TechName("Oracle DB-"),
new TechName("J2EE-")
);
Stream<TechName> stre = tech.stream();
//line n1
Which should be inserted at line n1 to print Java-Oracle DB-J2EE-?
정답: B
문제7
JDBC3.0を使用してデータベースドライバーをロードするには、どのアクションを使用できますか?
JDBC3.0を使用してデータベースドライバーをロードするには、どのアクションを使用できますか?
정답: D
문제8
コードの断片を考えると:
Path file = Paths.get ("courses.txt");
// line n1
Assume the courses.txt is accessible.
Which code fragment can be inserted at line n1 to enable the code to print the content of the courses.txt file?
コードの断片を考えると:
Path file = Paths.get ("courses.txt");
// line n1
Assume the courses.txt is accessible.
Which code fragment can be inserted at line n1 to enable the code to print the content of the courses.txt file?
정답: B
문제9
Bookクラスの定義を考えると:

Bookクラスについて正しい記述はどれですか?
Bookクラスの定義を考えると:

Bookクラスについて正しい記述はどれですか?
정답: E
문제10
customers.txtにアクセス可能であり、複数の行が含まれていると仮定します。
customers.txtファイルの内容を印刷するコードフラグメントはどれですか?
customers.txtにアクセス可能であり、複数の行が含まれていると仮定します。
customers.txtファイルの内容を印刷するコードフラグメントはどれですか?
정답: A
문제11
コードの断片を考えると:
public static void main (String [ ] args) throws IOException {
BufferedReader br = new BufferedReader (new InputStremReader
(System.in));
System.out.print ("Enter GDP: ");
//line 1
}
Which code fragment, when inserted at line 1, enables the code to read the GDP from the user?
コードの断片を考えると:
public static void main (String [ ] args) throws IOException {
BufferedReader br = new BufferedReader (new InputStremReader
(System.in));
System.out.print ("Enter GDP: ");
//line 1
}
Which code fragment, when inserted at line 1, enables the code to read the GDP from the user?
정답: D
문제12
コードの断片を考えると:
Path path1 = Paths.get("/app/./sys/");
Path res1 = path1.resolve("log");
Path path2 = Paths.get("/server/exe/");
Path res1 = path2.resolve("/readme/");
System.out.println(res1);
System.out.println(res2);
結果は何ですか?
コードの断片を考えると:
Path path1 = Paths.get("/app/./sys/");
Path res1 = path1.resolve("log");
Path path2 = Paths.get("/server/exe/");
Path res1 = path2.resolve("/readme/");
System.out.println(res1);
System.out.println(res2);
結果は何ですか?
정답: D
문제13
プロパティファイルを使用してアプリケーションをローカライズするResourceBundleを作成するように求められました。
どのコード例では、メニュー1とメニュー2の有効なキーをファイルメニューと表示メニューの値で指定していますか?
プロパティファイルを使用してアプリケーションをローカライズするResourceBundleを作成するように求められました。
どのコード例では、メニュー1とメニュー2の有効なキーをファイルメニューと表示メニューの値で指定していますか?
정답: A
문제14
与えられた:
public class Counter {
public static void main (String[ ] args) {
int a = 10;
int b = -1;
assert (b >=1) : "Invalid Denominator";
int = a / b;
System.out.println (c);
}
}
-daオプションを使用してコードを実行した結果はどうなりますか?
与えられた:
public class Counter {
public static void main (String[ ] args) {
int a = 10;
int b = -1;
assert (b >=1) : "Invalid Denominator";
int = a / b;
System.out.println (c);
}
}
-daオプションを使用してコードを実行した結果はどうなりますか?
정답: C