Exam 1z0-819 All QuestionsBrowse all questions from this exam
Question 83

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

    Correct Answer: D, E

    A module must be declared in a module-info.java file because this file is essential for defining the module's name and its various properties such as dependencies and exported packages. The java.base module exports all of the core packages of the Java platform, making it fundamental for the function and structure of Java applications.

Discussion
d7bb0b2Options: DE

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.

duydnOptions: 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.

RoxyFoxyOptions: AD

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..

RoxyFoxyOptions: AD

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..

StavokOptions: 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.

belal97Options: DE

d-100% e-80%

tmuralimanoharOptions: CD

Answer: CD