exam questions

Exam 1z0-819 All Questions

View all questions & answers for the 1z0-819 exam

Exam 1z0-819 topic 1 question 83 discussion

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

Which two statements are correct about modules in Java? (Choose two.)

  • A. module-info.java cannot be empty.
  • B. module-info.java can be placed in any folder inside module-path.
  • C. By default, modules can access each other as long as they run in the same folder.
  • D. A module must be declared in module-info.java file,
  • E. java.base exports all of the Java platforms core packages.
Show Suggested Answer Hide Answer
Suggested Answer: DE 🗳️

Comments

Chosen Answer:
This is a voting comment (?). It is better to Upvote an existing comment if you don't have anything to add.
Switch to a voting comment New
ASPushkin
1 month, 4 weeks ago
Selected Answer: AD
answer : ADE A. module-info.java connot be empty correct minimal module descriptor example module modulename { } The module declaration’s body can be empty but not a file D correct A module’s self-description is expressed in its module declaration (module-info.java) E. correct the Java 11 module java.base consists of the package called java.lang
upvoted 1 times
ASPushkin
1 month, 4 weeks ago
not correct it says "...all of the Java platforms..." Java SE, Java ME, Java EE see RoxyFoxy answer below
upvoted 1 times
ASPushkin
1 month, 4 weeks ago
answer: AD E not correct it says "...all of the Java platforms..." Java SE, Java ME, Java EE see RoxyFoxy answer below
upvoted 1 times
...
...
...
d7bb0b2
1 year, 1 month ago
D AND E IS CORRECT:_ D. A module must be declared in module-info.java file. E. java.base exports all of the Java platforms core packages.
upvoted 1 times
...
duydn
1 year, 1 month ago
Selected Answer: DE
D & E are correct. A incorrect because module-info.java can be empty. See: https://www.oracle.com/corporate/features/understanding-java-9-modules.html#:~:text=The%20module%20declaration's%20body%20can,a%20file%20named%20module%2Dinfo.
upvoted 1 times
...
RoxyFoxy
1 year, 3 months ago
A is correct because module-info.java cannot be empty, at minimum, it must specify the name of the module, like for example: module com.a { } . D is also correct because: "module declaration, a file with the name module-info.java that defines all properties of a module" (from https://dev.java/learn/modules/intro/). E is not correct because here is written "all of the Java platforms"- these are Java SE, Java ME, Java EE. So, the correct answers are: A and D...I think..
upvoted 1 times
...
RoxyFoxy
1 year, 3 months ago
A is correct because module-info.java cannot be empty, at minimum, it must specify the name of the module, like for example: module com.a { } . D is also correct because: "module declaration, a file with the name module-info.java that defines all properties of a module" (from https://dev.java/learn/modules/intro/). E is not correct because here is written "Java platforms"- these are Java SE, Java ME, Java EE. So, the correct answers are: A and D...I think..
upvoted 1 times
...
Stavok
1 year, 5 months ago
Selected Answer: DE
A module-info.java file is used to declare a module and its dependencies. It must contain at least one module declaration, so statement A is incorrect. The module-info.java file must be placed in the root directory of the module, so statement B is incorrect. Modules do not have access to each other by default, regardless of their location, so statement C is incorrect. The java.base module exports all of the core packages of the Java platform, so statement E is correct.
upvoted 1 times
...
belal97
1 year, 6 months ago
Selected Answer: DE
d-100% e-80%
upvoted 1 times
...
tmuralimanohar
1 year, 6 months ago
Answer: CD
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 ...
exam
Someone Bought Contributor Access for:
SY0-701
London, 1 minute ago