nerdexam
Oracle

1Z0-819 · Question #59

Given an application with a main module that has this module-info.java file: module main { exports country; uses country.CountryDetails; } Which two are true? (Choose two.)

The correct answer is B. B. A module providing an implementation of country.CountryDetails must have a requires main; directive in its module-info.java file. See the full explanation below for the reasoning.

Question

Given an application with a main module that has this module-info.java file: module main { exports country; uses country.CountryDetails; } Which two are true? (Choose two.)

Options

  • AA module providing an implementation of country.CountryDetails can be compiled and added without recompiling the main module.
  • BB. A module providing an implementation of country.CountryDetails must have a requires main; directive in its module-info.java file.
  • CC. An implementation of country.CountryDetails can be added to the main module.
  • DD. 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.
  • EE. To run without an error, the application must have at least one module in the module path that provides an implementation of country.CountryDetails.

How the community answered

(36 responses)
  • A
    8% (3)
  • B
    83% (30)
  • C
    3% (1)
  • E
    6% (2)

Community Discussion

No community discussion yet for this question.

Full 1Z0-819 Practice