1z0-819 Exam QuestionsBrowse all questions from this exam

1z0-819 Exam - Question 20


Given:

and the commands:

What is the result on execution of these commands?

Show Answer
Correct Answer: CD

The `jdeps` command is used to analyze the dependencies of Java class files. The `-summary` option provides a summary of these dependencies. In this case, the `Test` class creates an instance of `Timestamp` from the `java.sql` package. As `java.sql` is a part of the `java.base` module, the correct output of the `jdeps -summary Test.class` command would reflect this dependency structure: `Test.class -> java.base`, `Test.class -> java.sql`, and `java.sql -> java.base`. This shows that the `Test` class depends on both `java.base` and `java.sql`, and the `java.sql` module further depends on `java.base`. Therefore, the correct answer is: `Test.class -> java.base - Test.class -> java.sql - java.sql -> java.base`.

Discussion

9 comments
Sign in to comment
Ankit1010Option: C
Feb 6, 2023

C is the right answer Test.class -> java.base Test.class - > java.sql

cathDevOption: C
Apr 3, 2024

C correct tested

OmnisumemOption: C
Aug 9, 2023

tested.

StavokOption: D
Jul 15, 2023

The correct answer is D. Test.class -> java.base - Test.class - > java.sql - java.sql -> java.base. The jdeps command shows the package-level or class-level dependencies of Java class files. The output shows that the Test class depends on both the java.base and java.sql modules, and that the java.sql module depends on the java.base module.

StavokOption: D
Jul 15, 2023

The correct answer is D. Test.class -> java.base - Test.class - > java.sql - java.sql -> java.base. The jdeps command shows the package-level or class-level dependencies of Java class files. The output shows that the Test class depends on both the java.base and java.sql modules, and that the java.sql module depends on the java.base module.

Ashan_OzlovOption: C
Nov 4, 2023

q20.class -> java.base q20.class -> java.sql

d7bb0b2Option: D
Jan 6, 2024

D are correct: The correct answer is D. The `jdeps` command is a tool for analyzing the dependencies of a Java class or JAR file. The `-summary` option shows a summary of the package dependencies. In this case, the `Test` class has a dependency on the `java.sql.Timestamp` class, which is part of the `java.sql` package. The `java.sql` package is part of the `java.base` module. Therefore, the output of the `jdeps -summary Test.class` command would be: ``` Test.class -> java.base Test.class -> java.sql java.sql -> java.base ``` This means that `Test.class` depends on both `java.base` and `java.sql`, and `java.sql` in turn depends on `java.base`.

Bravo6633Option: D
Mar 7, 2024

java.sql is a part of java.base

aruni_mishraOption: C
Jun 5, 2024

Tested (TestJdeps is class name): ------------------------------------------------ jdeps -summary TestJdeps.class TestJdeps.class -> java.base TestJdeps.class -> java.sql