nerdexam
Oracle

1Z0-815 · Question #23

Given: Which two lines can replace line 1 so that the Y class compiles? (Choose two.)

The correct answer is B. set(map.values()); D. super.set(map.values()). See the full explanation below for the reasoning.

Question

Given:

Which two lines can replace line 1 so that the Y class compiles? (Choose two.)

Exhibit

1Z0-815 question #23 exhibit

Options

  • Amap.forEach((k, v) -> set(v)));
  • Bset(map.values());
  • Csuper.set(List<String> map)
  • Dsuper.set(map.values());
  • Eset(map)

How the community answered

(41 responses)
  • A
    12% (5)
  • B
    78% (32)
  • C
    2% (1)
  • E
    7% (3)

Community Discussion

No community discussion yet for this question.

Full 1Z0-815 Practice