• Post Reply Bookmark Topic Watch Topic
  • New Topic
programming forums Java Mobile Certification Databases Caching Books Engineering Micro Controllers OS Languages Paradigms IDEs Build Tools Frameworks Application Servers Open Source This Site Careers Other Pie Elite all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Tim Cooke
  • paul wheaton
  • Jeanne Boyarsky
  • Ron McLeod
Sheriffs:
  • Paul Clapham
  • Liutauras Vilda
  • Devaka Cooray
Saloon Keepers:
  • Tim Holloway
  • Roland Mueller
Bartenders:

Sybex 816. A Test Bank question on Modules

 
Greenhorn
Posts: 29
Google Web Toolkit jQuery Netbeans IDE
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all,

I found a contradiction between what appears on the book (e-version) and the test bank:

Exploring a bottom up migration strategy (Chapter 6)

the unnamed modules [...] access IAR files on both the classpath and the module path



Question

tb617624.JaSE11PrgIISG.be1.53
A(n) ________________ module can reference classes in a(n) _______________ module. Assume the package is exported as needed. (Choose all that apply.)


Answer

You Answered Incorrectly.
Named modules can read only from the module path, making option C correct and option D incorrect. Unnamed modules can read only from the classpath, making options E and F incorrect. Automatic modules can read from either the classpath or the module path, making options A and B correct.



Thank you in advance to clear it up :-)
Bye
Fabio
 
author & internet detective
Posts: 42103
933
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Confirmed. E & F are also correct. Table 6.3 in the book is correct and summarizes the situation nicely.

I've added this to the errata and credited you.
 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi all.
I think Jeanne actually most probably, intended table 17.3, from Chapter 17: Modular Applications.
I've encountered the same error, mentioned by Fabio Salvi, in the Test Bank, for Practice Exam 3.
Analyzing the response for this question (tb617624.JaSE11PrgIISG.be1.53)
, and comparing it with the information from the table 17.3, there is one thing that's not very clear for me.
In row number 3, for the column "Unnamed" we have "No" as a response.
Here is the full sentence:

An unnamed module is readable by other modules on the module path? - No



This contradicts with the information from the answer of the Test Bank's question:

Automatic modules can read from either the classpath or the module path



Does it mean that "No" from the table is partially wrong?
Because:
Automatic modules can read from the classpath (here is our unnamed module)
Named modules can't read from the classpath // here I totally agree that "No" from the table is okay.

Jeanne, could you please add light to this?
Thank you in advance.
 
Jeanne Boyarsky
author & internet detective
Posts: 42103
933
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
No. There's a distinction between unnamed and automatic modules. Even though they are the same jar, their placement changes what they are. An unnamed module is on the classpath. An automatic module is on the module path.
 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

(This is related to most recent post in the thread) I am still a bit confused about the reasoning for why option B is correct for this question in the Test Bank. According to the given answer, automatic modules can reference classes in an unnamed module. But according to the table referenced above, it says that unnamed modules cannot be read by modules on the module path. Automatic modules as stated above are on the module path.

Wouldn't this mean option B is incorrect? Any clarification would be appreciated!
 
Jeanne Boyarsky
author & internet detective
Posts: 42103
933
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The problem is the automatic modules are on the module path, but have a special superpower where they can read stuff from the unnamed module.
 
You can't expect to wield supreme executive power just because
Smokeless wood heat with a rocket mass heater
https://woodheat.net
reply
    Bookmark Topic Watch Topic
  • New Topic