Question: Suppose you have the following class in a module named animal.insect.impl. Which two most likely go in the module-info of the service locator? (Choose two.)

Suppose you have the following class in a module named animal.insect.impl. Which two most likely go in the module-info of the service locator? (Choose two.) 

package animal.insect.impl; import animal. insect.api.bugs.Bug; public class Worm implements Bug { @Override

A. requires animal.insect.api.bugs;

B. requires animal.insect.api.bugs.Bug;

C. requires animal.insect.impl;

D. uses animal.insect.api.bugs;

E. uses animal.insect.api.bugs.Bug;

F. uses animal.insect.api.bugs.Bug with animal.insect.impl.Worm;

package animal.insect.impl; import animal. insect.api.bugs.Bug; public class Worm implements Bug { @Override public int crawl() { return 1; } }

Step by Step Solution

3.31 Rating (154 Votes )

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock

The question refers to Javas module system and service provider interfaces Based on the provided code snippet we have a class Worm in the package anim... View full answer

blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Oracle Questions!