• 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
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
  • Bear Bibeault
Sheriffs:
  • Jeanne Boyarsky
  • Tim Cooke
  • Devaka Cooray
Saloon Keepers:
  • Tim Moores
  • Tim Holloway
  • Piet Souris
  • salvin francis
  • Stephan van Hulst
Bartenders:
  • Frits Walraven
  • Carey Brown
  • Jj Roberts

Sybex 1Z0-815: Chapter 11 -- End of Chapter Question Beefs

 
Ranch Hand
Posts: 57
3
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
I posted some questions about content of the chapter separately.

"Suppose you have the commands javac, java, and jar. How many of them support a --show-module-resolution option?"

I agreed with the answer: 1.  But the explanation made me ask "Whatchyu talkin' about Willis?"
The java command uses this option to print information when the program loads.
You might think jar does the same thing since it runs a program too. Alas, this parameter does not exist on jar.

I never used the jar command to execute a program (other than the JAR program, of course) so I am not sure what we mean here.

Also, the answer to a question says that the following is legal:
java -p x-x -m x/x

I don't get what the x-x really meant.  Does it suggest that module path can contain a '-' character in it somewhere?  I guess that is true for a fully qualified path but I found this one really confusing.

Maybe this just gets to the heart of why both writing and taking a multiple choice exam is fraught with adventure and peril, but when I saw:
Suppose module puppy depends on module dog and module dog depends on module animal. Fill in the blank so that code in module dog can access the animal.behavior package in module animal.

module animal {
  _______ animal.behavior;
}

I thought for sure that this intended us to say "HA!!  That won't do unless we also have a 'requires animal' in the module-info.java for dog", so I chose "None of the above" instead of "exports", which I thought was necessary but not sufficient.

Yeah, the variability on what you can or can not assume about what isn't shown makes me feel like a perfect or extremely high score could just come down to luck.  I got far enough to ask if they wanted "exports" or "none of the above" -- if "none of the above" wasn't a choice I'd have gotten it right, since that forces the assumption that the requires happens off-stage.

Those were my quibbles.  I still sort-of passed this set of questions.

Cheers,
Jesse


 
Run away! Run away! Here, take this tiny ad with you:
the value of filler advertising in 2020
https://coderanch.com/t/730886/filler-advertising
reply
    Bookmark Topic Watch Topic
  • New Topic