• 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
  • Ron McLeod
  • Paul Clapham
  • Jeanne Boyarsky
  • Liutauras Vilda
Sheriffs:
  • Rob Spoor
  • Bear Bibeault
  • Tim Cooke
Saloon Keepers:
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
  • Piet Souris
Bartenders:
  • Frits Walraven
  • Himai Minh

Sybex CSG 11, chapter 1, questions 14 and 16, possible wrong options on Answers to review questions

 
Greenhorn
Posts: 1
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi guys, I hope you're doing well.

On the chapter 1, I guess the section "Answers to review questions" gave wrong for the questions 14 and 16.

For the question 14, it says the right options would be A, B, C and E.
But C doesn't work, once "-cp" has the short form "-c" (--create-file) and would provide also a "-p" that is an invalid argument for the "jar" command.

Regarding 16, it gives me a scenario where I have a file /my/directory/named/A/Bird.java, where my pwd would be /my/directory, and asks me possible package names in case I decided to compile that Bird.java file from the pwd.
Well, actually, with any of options 2(B), 4(D), 6(F) works fine, no compilation fail is raised when invoked;
$ (pwd /my/directory) javac named/A/Bird.java
But the "Answers to review questions" tells that for that question, the right option to be taken would be the 4(D).

Just for information, I'm reading that book (OCP Oracle Certified Professional Java SE 11 Developer Complete Study Guide) from Safari Books (https://learning.oreilly.com/library/view/ocp-oracle-certified/9781119619130/)

Warmest regards,
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic