試験準備には欠かさない!1z0-809日本語問題解答で1z0-809日本語試験問題集 [Q97-Q112]

Share

試験準備には欠かさない!1z0-809日本語問題解答で1z0-809日本語試験問題集

リアルOracle 1z0-809日本語試験問題 [更新されたのは2026年]

質問 # 97
コードの断片を考えると:

どの変更により、コードはPrice 5 New Price 4を印刷できますか?

  • A. Replace line n3 with .forEach (n -> System.out.println ("New Price" + n));
  • B. Replace line n1 with .forEach (e -> System.out.print ("Price" + e))
  • C. Replace line n2 with .map (n -> System.out.println ("New Price" + n ?)) and remove line n3
  • D. Replace line n2 with .mapToInt (n -> n ?1);

正解:A


質問 # 98

UnaryOperator<Integer> uo1 = s -> s*2;line n1
List<Double> loanValues = Arrays.asList(1000.0, 2000.0);
loanValues.stream()
.filter(lv -> lv >= 1500)
.map(lv -> uo1.apply(lv))
.forEach(s -> System.out.print(s + " "));

  • A. Option B
  • B. Option C
  • C. Option A
  • D. Option D

正解:D


質問 # 99
Given:
interface Doable {
public void doSomething (String s);
}
Which two class definitions compile?

  • A. public class Action implements Doable {
    public void doSomething(Integer i) { }
    public String doThis(Integer j) { }
    }
  • B. public class Do implements Doable {
    public void doSomething(Integer i) { }
    public void doSomething(String s) { }
    public void doThat (String s) { }
    }
  • C. public abstract class Task implements Doable { public void doSomethingElse(String s) { }
    }
  • D. public abstract class Work implements Doable { public abstract void doSomething(String s) { } public void doYourThing(Boolean b) { }
    }
  • E. public class Job implements Doable {
    public void doSomething(Integer i) { }
    }

正解:B、C


質問 # 100

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);

  • A. Option B
  • B. Option C
  • C. Option A
  • D. Option D

正解:D


質問 # 101
Given:

  • A. 0 0
  • B. Compilation fails.
  • C. 9 25
  • D. 3 5

正解:D


質問 # 102
与えられたコードの断片:
class Employee {
Optional<Address> address;
Employee (Optional<Address> address) {
this.address = address;
}
public Optional<Address> getAddress() { return address; }
}
class Address {
String city = "New York";
public String getCity { return city: }
public String toString() {
return city;
}
}
and
Address address = null;
Optional<Address> addrs1 = Optional.ofNullable (address);
Employee e1 = new Employee (addrs1);
String eAddress = (addrs1.isPresent()) ? addrs1.get().getCity() : "City Not
available";
結果は何ですか?

  • A. A NoSuchElementExceptionは実行時に向けられます
  • B. null
  • C. ニューヨーク
  • D. 入手可能ではない都市

正解:D


質問 # 103
Empクラスの定義が与えられた場合:
public class Emp
private String eName;
private Integer eAge;
Emp(String eN, Integer eA) {
this.eName = eN;
this.eAge = eA;
}
public Integer getEAge () {return eAge;}
public String getEName () {return eName;}
}
およびコードの断片:
List<Emp>li = Arrays.asList(new Emp("Sam", 20), New Emp("John", 60), New Emp("Jim", 51)); Predicate<Emp> agVal = s -> s.getEAge() <= 60;//line n1 li = li.stream().filter(agVal).collect(Collectors.toList()); Stream<String> names = li.stream()map.(Emp::getEName);//line n2 names.forEach(n -> System.out.print(n + " ")); 結果は何ですか?

  • A. 行n1でコンパイルエラーが発生します。
  • B. サムジョンジム
  • C. コンパイルエラーが行n2で発生します。
  • D. ジョンジム

正解:A


質問 # 104


Which two classes use the shape class correctly?

  • A. Option B
  • B. Option D
  • C. Option C
  • D. Option A
  • E. Option F
  • F. Option E

正解:A、F

解説:
When an abstract class is subclassed, the subclass usually provides implementations for all of the abstract methods in its parent class (E). However, if it does not, then the subclass must also be declared abstract (B). Note: An abstract class is a class that is declared abstract-it may or may not include abstract methods. Abstract classes cannot be instantiated, but they can be subclassed.


質問 # 105

interface CourseFilter extends Predicate<String> {
public default boolean test (String str) {
return str.equals ("Java");
}
}
and
List<String> strs = Arrays.asList("Java", "Java EE", "Java ME");
Predicate<String> cf1 = s - > s.length() > 3;
Predicate cf2 = new CourseFilter() { //line n1
public boolean test (String s) {
return s.contains ("Java");
}
};
long c = strs.stream()
.filter(cf1)
.filter(cf2//line n2
.count();
System.out.println(c);

  • A. Option D
  • B. Option B
  • C. Option A
  • D. Option C

正解:C


質問 # 106


  • A. Path iP = new Path ("/First.txt");
  • B. Path iP = Paths.toPath ("/First.txt");
  • C. Path iP = Paths.get ("/", "First.txt");
  • D. Path iP = new Paths ("/First.txt");

正解:C


質問 # 107
どのクラス定義がコンパイルされますか?

  • A.
  • B.
  • C.
  • D.

正解:C


質問 # 108


  • A. Java EESE
  • B. Java EEJava SE
  • C. The program prints either:
    Java EEJava SE
    or
    Java SEJava EE
  • D. Java EEJava EESE

正解:B


質問 # 109

  • A. Option D
  • B. Option B
  • C. Option A
  • D. Option C
  • E. Option E

正解:C、E

解説:
Reference: http://www.programmerinterview.com/index.php/java-questions/interface-vsabstract-class/


質問 # 110
Bookクラスの定義を考えると:

Bookクラスについて正しい記述はどれですか?

  • A. It is defined using the singleton design pattern.
  • B. It demonstrates polymorphism.
  • C. It is defined using the factory design pattern.
  • D. It is an immutable class.
  • E. It demonstrates encapsulation.

正解:E


質問 # 111

IntStream stream = IntStream.of (1,2,3); IntFunction<Integer> inFu= x -> y -> x*y;//line n1 IntStream newStream = stream.map(inFu.apply(10));//line n2
newStream.forEach(System.output::print);

  • A. Replace line n1 with:
    IntFunction<UnaryOperator> inFu = x -> y -> x*y;
  • B. Replace line n1 with:
    BiFunction<IntUnaryOperator> inFu = x -> y -> x*y;
  • C. Replace line n1 with:
    IntFunction<IntUnaryOperator> inFu = x -> y -> x*y;
  • D. Replace line n2 with:
    IntStream newStream = stream.map(inFu.applyAsInt (10));

正解:D


質問 # 112
......

1z0-809日本語合格させる試験問題集には更新されたのは2026年:https://www.goshiken.com/Oracle/1z0-809-JPN-mondaishu.html