• 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
  • Devaka Cooray
  • Ron McLeod
  • Paul Clapham
  • Liutauras Vilda
Sheriffs:
  • paul wheaton
  • Jeanne Boyarsky
  • Tim Cooke
Saloon Keepers:
  • Stephan van Hulst
  • Tim Holloway
  • Tim Moores
  • Mikalai Zaikin
  • Carey Brown
Bartenders:

OCP Java SE 11 Programmer I Study Guide. Is this answer correct?

 
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello Jeanne Boyarsky and Scott Selikoff!

First of all: thank you for the great book! I have great pleasure to learn from it

I want to ask about a correct answer to the question 21. from chapter 11. The question is as follow:

Which of the following are legal commands to run a modular program where n is the package name and c is the class name? (Choose all that apply.)



In the explanation you claim that option C is correct as

The module name and class name are separated with a slash, making option C the answer.



Since n is the package name but not the module name I find it incorrect and would rather go with answer G - "None of above". Unless module name is explicitly told I can't assume a module name is the same as given package name. Am I right?
 
Marshal
Posts: 78698
374
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Welcome to the Ranch

For those of us who don't have the book, please copy out the question; I don't know what C is.
 
author & internet detective
Posts: 41775
887
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
Jakub,
Thank you for letting us know about this! You are correct. It should be G! I've added this to the errata list and credited you.

Also welcome to the Ranch!

I'm just curious: did you get through the whole book without finding any other errors? Or did you start with ch 11 because modules are new?
 
Jakub Ch.
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Campbell Ritchie

Option C was "java --module-path x -m n/c" ;)

@Jeanne Boyarsky

I've started from chapter 8 because I had read first 4 chapters of OCA 8 study guide before. Now I'm reading newer book from the beginning, catching up with differences. During the preparations I changed my mind about a version of the exam I am going to take

I found one more issue. I didn't experience the compilation error described in a "Order matters!" section from Chapter 11. I believe I created the same structure of the module but the failing command ran flawlessly. I've tested it against JDK 11.0.5 on Windows 10 OS. Could it have been changed recently? Could you refer any additional sources related to ordering of source paths for javac command?

Greetings,
Jakub
 
Jeanne Boyarsky
author & internet detective
Posts: 41775
887
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

Jakub Ch. wrote:I've started from chapter 8 because I had read first 4 chapters of OCA 8 study guide before. Now I'm reading newer book from the beginning, catching up with differences. During the preparations I changed my mind about a version of the exam I am going to take


Makes sense. Note that a good amount is new in chapters 5 and 6. (APIs and Lambdas.) Much of this material used to be on OCP 8 and is now on the first exam.

Jakub Ch. wrote:I found one more issue. I didn't experience the compilation error described in a "Order matters!" section from Chapter 11. I believe I created the same structure of the module but the failing command ran flawlessly. I've tested it against JDK 11.0.5 on Windows 10 OS. Could it have been changed recently? Could you refer any additional sources related to ordering of source paths for javac command?


In good news, you don't need to know about the order the source files are listed for the exam. It might depend on the compiler or the OS or pretty much anything. I encountered this error when writing the chapter so included it for any readers who hit the same thing. I didn't spend time trying to see exactly when it occurs. So all I really know about it is "that happened to me."

In the real world, people don't compile at the command line. So that's something Scott and I do for the book, grumble about and move on .
 
Jakub Ch.
Greenhorn
Posts: 3
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
@Jeanne Boyarsky

I'll sure read remaining chapters Thank you for your answers!
 
Tick check! Okay, I guess that was just an itch. Oh wait! Just a tiny ad:
a bit of art, as a gift, the permaculture playing cards
https://gardener-gift.com
reply
    Bookmark Topic Watch Topic
  • New Topic