Free 1z0-819 – Java SE 11 Developer Practice Test Question

Free demo downloads

Loading demo links...

Showing 1–3 of 15 questions

Question 1

Given:

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

Select all that apply, then click Submit answer.

  • ○

    map.forEach((k, v) -> set(v)));

  • ○

    set(map.values());

  • ○

    super.set(List map)

  • ○

    super.set(map.values());

  • ○

    set(map)


Question 2

Given:

Which two are correct? (Choose two.)

Select all that apply, then click Submit answer.

  • ○

    The output will be exactly 2 1 3 4 5.

  • ○

    The program prints 1 4 2 3, but the order is unpredictable.

  • ○

    Replacing forEach() with forEachOrdered(), the program prints 2 1 3 4 5, but the order is unpredictable.

  • ○

    Replacing forEach() with forEachOrdered(), the program prints 1 2 3 4 5.

  • ○

    Replacing forEach() with forEachOrdered(), the program prints 2 1 3 4 5.


Question 3

Which two statements independently compile? (Choose two.)

Select all that apply, then click Submit answer.

  • ○

    List list = new ArrayList();

  • ○

    List list = new ArrayList();

  • ○

    List list = new ArrayList();

  • ○

    List list = new ArrayList();

  • ○

    List list = new ArrayList();