nerdexam
Oracle

1Z0-819 · Question #191

Given the CopyServiceAPI that has the org.copyservice.spi. Copy Interface To use this service in a module, which module- info java would be correct?

The correct answer is C. module CopyConsumer { requires org.copyservice.spi.Copy; }. See the full explanation below for the reasoning.

Question

Given the CopyServiceAPI that has the org.copyservice.spi. Copy Interface To use this service in a module, which module- info java would be correct?

Options

  • Amodule CopyConsumer { requires CopyServiceAPI; }
  • Bmodule CopyConsumer { requires transitive org.copyservice.spi.Copy; }
  • Cmodule CopyConsumer { requires org.copyservice.spi.Copy; }
  • Dmodule CopyConsumer { uses CopyServiceAPI; }

How the community answered

(35 responses)
  • A
    14% (5)
  • B
    9% (3)
  • C
    74% (26)
  • D
    3% (1)

Community Discussion

No community discussion yet for this question.

Full 1Z0-819 Practice