Welcome to ExamTopics
ExamTopics Logo
- Expert Verified, Online, Free.

Unlimited Access

Get Unlimited Contributor Access to the all ExamTopics Exams!
Take advantage of PDF Files for 1000+ Exams along with community discussions and pass IT Certification Exams Easily.

Exam 1z0-819 topic 1 question 82 discussion

Actual exam question from Oracle's 1z0-819
Question #: 82
Topic #: 1
[All 1z0-819 Questions]

A company has an existing Java app that includes two Java 8 jar files, sales-8.10.jar and clients-10.2.jar.

The jar file, sales-8.10.jar, references 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.java file would work for the new library version clients-10.3.jar?

  • A. module com.company.clients{
    requires com.company.clients;
    }
  • B. module com.company.clients{
    uses com.company.clients;
    }
  • C. module com.company.clients {
    exports com.company.clients.Client;
    }
  • D. module com.company.clients {
    exports com.company.clients;
    }
Show Suggested Answer Hide Answer
Suggested Answer: C 🗳️

Comments

Chosen Answer:
This is a voting comment (?) , you can switch to a simple comment.
Switch to a voting comment New
ASPushkin
1 day, 12 hours ago
answer : D client-10.2.jar becomes as a named module after modulizing sales-8.10.jar migrates as unnamed module The unnamed module reads every other module. But it still does not have access to non-exported packages in named module So we need to provide export directive in it module descriptor in the format of requires modulename;
upvoted 1 times
...
d7bb0b2
6 months ago
D is correct: exports only can export packages not clasess
upvoted 1 times
...
Stavok
11 months, 3 weeks ago
Selected Answer: D
The correct answer is D.
upvoted 1 times
...
Stavok
11 months, 3 weeks ago
The correct answer is D. module com.company.clients { exports com.company.clients; }. The module-info.java file defines the module and its dependencies. Since the sales-8.10.jar file references packages in clients-10.2.jar, the new clients-10.3.jar module should export the necessary packages so that they can be accessed by other modules. In this case, the com.company.clients package should be exported using the exports directive.
upvoted 1 times
...
tmuralimanohar
1 year ago
Answer: D
upvoted 1 times
...
Obalt
1 year, 5 months ago
Correct answer is D
upvoted 1 times
...
Community vote distribution
A (35%)
C (25%)
B (20%)
Other
Most Voted
A voting comment increases the vote count for the chosen answer by one.

Upvoting a comment with a selected answer will also increase the vote count towards that answer by one. So if you see a comment that you already agree with, you can upvote it instead of posting a new comment.

SaveCancel
Loading ...
ex Want to SAVE BIG on Certification Exam Prep?
close
ex Unlock All Exams with ExamTopics Pro 75% Off
  • arrow Choose From 1000+ Exams
  • arrow Access to 10 Exams per Month
  • arrow PDF Format Available
  • arrow Inline Discussions
  • arrow No Captcha/Robot Checks
Limited Time Offer
Ends in