• 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 all forums
this forum made possible by our volunteer staff, including ...
Marshals:
  • Campbell Ritchie
  • Bear Bibeault
  • Paul Clapham
  • Jeanne Boyarsky
  • Knute Snortum
Sheriffs:
  • Liutauras Vilda
  • Tim Cooke
  • Junilu Lacar
Saloon Keepers:
  • Ron McLeod
  • Stephan van Hulst
  • Tim Moores
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Joe Ess
  • salvin francis
  • fred rosenberger

Clarifications/Errata on Chapter 11 (Modules) of OCP Java SE11 Programmer I Study Guide

 
Ranch Hand
Posts: 185
1
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I refer to the OCP Java SE11 Programmer I Study Guide by Jeanne Boyarsky and Scott Selikoff, specifically on chapter 11 on modules.

On page 459, in the table titled "What happened to the Classpath", "-class-path" is missing an additional "-" in front.

On page 476, in the table "More About Describing Modules", the first lines states that "You only need to know how to run - - describe-module for the exam." Basically, this table is saying that we don't need to know the details of the output for the exam, but it is providing us some information on the output anyway. Yet on page 488, question 14 is about the output of - - describe-module. The problem I had with this question was that I had difficulty deciding on answers A (requires java. base mandated) and D (requires mandated java.base). It seems that it is important that we need to know the exact placement of the "mandated" modifier. If you look at page 476 again, notice that we also have "requires zoo.animal.feeding transitive" in the output. Notice that the "transitive" modifier is also at the end, even though in module-info.java, it is immediately after "requires". So my guess is that - -describe-module puts all modifiers at the end. It could well be that in a later JDK version, they change the output of - - describe-module and place all the modifiers immediately after "requires". So my assumption is that the output of --describe-module is not important at all, and therefore we should not expect to see a question like question 14 in the exam. The authors should clarify on this.

On page 482, table 11.7, the -cp option (and its long forms) for the java command should be listed in the table for completeness (since it is also listed for javac). It is an option needed for the exam, as mentioned on page 22, table 1.4.

On page 489, I completely had no idea on the answer. It turned out that there is actually an --add-exports option for the java command. I can't seem to find this option mentioned anywhere else in the book. On page 482, table 11.7, it is also not listed there, so I assume that this option is not need at all for the exam. The authors should clarify on this.
 
author & internet detective
Posts: 39789
797
Eclipse IDE VI Editor Java
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator

Edmund Yong wrote:
On page 459, in the table titled "What happened to the Classpath", "-class-path" is missing an additional "-" in front.


I don't consider that an error. We are talking about a concept here; it's not code.

Edmund Yong wrote:
On page 476, in the table "More About Describing Modules", the first lines states that "You only need to know how to run - - describe-module for the exam." Basically, this table is saying that we don't need to know the details of the output for the exam, but it is providing us some information on the output anyway. Yet on page 488, question 14 is about the output of - - describe-module. The problem I had with this question was that I had difficulty deciding on answers A (requires java. base mandated) and D (requires mandated java.base). It seems that it is important that we need to know the exact placement of the "mandated" modifier. If you look at page 476 again, notice that we also have "requires zoo.animal.feeding transitive" in the output. Notice that the "transitive" modifier is also at the end, even though in module-info.java, it is immediately after "requires". So my guess is that - -describe-module puts all modifiers at the end. It could well be that in a later JDK version, they change the output of - - describe-module and place all the modifiers immediately after "requires". So my assumption is that the output of --describe-module is not important at all, and therefore we should not expect to see a question like question 14 in the exam. The authors should clarify on this.


On page 475, we covered the "mandated" syntax. The feature "more about describing modules" means you don't need to know everything about the command. I agree it could be clearer and have noted that on our private list of "stuff that isn't quite wrong"

Edmund Yong wrote:
On page 482, table 11.7, the -cp option (and its long forms) for the java command should be listed in the table for completeness (since it is also listed for javac). It is an option needed for the exam, as mentioned on page 22, table 1.4.


Table 1.4 on page 22 does mention -cp for java so it is in the book. I've made a note of it's omission from 11.7 (on our private list) since I agree we should have included it.

Edmund Yong wrote:
On page 489, I completely had no idea on the answer. It turned out that there is actually an --add-exports option for the java command. I can't seem to find this option mentioned anywhere else in the book. On page 482, table 11.7, it is also not listed there, so I assume that this option is not need at all for the exam. The authors should clarify on this.


It's covered that you can do this  in the note on page 475:

It is also possible to add modules, exports, and more at the command line.
But please don’t. It’s confusing and hard to maintain. Note these flags are
available on java , but not all commands.


We intentionally didn't include it in the table because all you need to know is that it is possible. Listing the option name or covering it in code would suggest that you needed to know more about it.
 
Or we might never have existed at all. Freaky. So we should cherish everything. Even this tiny ad:
Sauce Labs - World's Largest Continuous Testing Cloud for Websites and Mobile Apps
https://coderanch.com/t/722574/Sauce-Labs-World-Largest-Continuous
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!