1z0-816 Java SE 11 Programmer II

Loading demo links...

Showing 1–3 of 10 questions

Question 1

Given an application with a main module that has this module-info.java file:

Which two are true? (Choose two.)

Select all that apply, then click Submit answer.

  • A module providing an implementation of country.CountryDetails can be compiled and added without recompiling the main module.

  • A module providing an implementation of country.CountryDetails must have a requires main; directive in its module-info.java file.

  • An implementation of country.countryDetails can be added to the main module.

  • To compile without an error, the application must have at least one module in the module source path that provides an implementation of country.CountryDetails.

  • To run without an error, the application must have at least one module in the module path that provides an implementation of country.CountryDetails.

Question 2

Assuming the Widget class has a getPrice method, this code does not compile:

Which two statements, independently, would allow this code to compile? (Choose two.)

Select all that apply, then click Submit answer.

  • Replace line 5 with widgetStream.filter(a −> ((Widget)a).getPrice() > 20.00).

  • Replace line 1 with List widgetStream = widgets.stream();.

  • Replace line 5 with widgetStream.filter((Widget a) −> a.getPrice() > 20.00).

  • Replace line 4 with Stream widgetStream = widgets.stream();.

Question 3

Given:

Which two are correct? (Choose two.)

Select all that apply, then click Submit answer.

  • Option A

  • Option B

  • Option C

  • Option D

  • Option E