Java SE 17 Developer — Question 6

Assume you have an automatic module from the module path display-ascii-0.2.jar.
Which name is given to the automatic module based on the given JAR file?

Answer options

Correct answer: B

Explanation

The correct answer is B, 'display-ascii', as the automatic module name is derived from the base name of the JAR file, excluding the version number. Options A and D include version elements which are not part of the automatic module name, while option C uses a dot instead of a hyphen, which is not the correct format.