Oracle
1Z0-819 · Question #196
A company has an existing Java app that includes two Java 8 jar files, sales-3.10.jar and clients- 10.2.jar. The sales-3.10.jar uses packages in clients-10.2.jar, but clients-10.2.jar does not…
The correct answer is C. module com.company.clients { exports com.company.clients; }. See the full explanation below for the reasoning.
Question
A company has an existing Java app that includes two Java 8 jar files, sales-3.10.jar and clients- 10.2.jar. The sales-3.10.jar uses packages in clients-10.2.jar, but clients-10.2.jar does not reference packages in sales -8.10.jar. They have decided to modularize clients-10.2.jar. Which module- info declaration is valid for the new library version clients-10.2.jar?
Options
- Amodule com.company.clients { uses com.company.clients; }
- Bmodule com.company.clients { requires com.company.clients; }
- Cmodule com.company.clients { exports com.company.clients; }
- Dmodule com.company.clients { exports com.company.clients; }
How the community answered
(31 responses)- A13% (4)
- B3% (1)
- C77% (24)
- D6% (2)
Community Discussion
No community discussion yet for this question.