• 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:
  • Tim Cooke
  • Campbell Ritchie
  • Paul Clapham
  • Ron McLeod
  • Liutauras Vilda
Sheriffs:
  • Jeanne Boyarsky
  • Rob Spoor
  • Bear Bibeault
Saloon Keepers:
  • Jesse Silverman
  • Tim Moores
  • Stephan van Hulst
  • Tim Holloway
  • Carey Brown
Bartenders:
  • Piet Souris
  • Al Hobbs
  • salvin francis

“Sybex” - 1Z0-815 - Chapter 11 page 485

 
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hello,

In the Review Questions, Chapter 11, question 2, the location of the module-info.java has been asked.

zoo.staff
|---zoo
   |-- staff
       |-- Vet.java

I want to be sure that the answer is E. Since, at the beginning of Chapter 11, the zoo.animal.feeding module
has kept module-info.java under feeding directory ( The directory structure for the feeding module:
feeding\zoo\animal\feeding on windows and module-info.java has been located under first feeding).

Here, in this question, module-info.java must be under zoo\ right? (windows)

 
Marshal
Posts: 74376
334
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Please supply full details of the book, including authors' names (is it the Boyarsky and Selikoff book?) and full details of the quesiton because many of us don't have that book.
 
taylan istanbul
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Hi Campbell,

Book Name: OCP Java SE 11 Programmer I Study Guide- Exam 1Z0-815
Authors: Jeanne Boyarsky
Scott Selikoff

The page details: 485
Question 2
 
author & internet detective
Posts: 40798
829
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

taylan istanbul wrote:Here, in this question, module-info.java must be under zoo\ right? (windows)


No. The module-info.java file is at the same level as the root package.

In feeding\zoo\animal\feeding, the package is zoo.animal.feeding. The root package is zoo. It happens to be in a folder called "feeding". Therefore the module-info goes in the top level feeding package.

In the question 2 example you posted, zoo is the root package as well. It is in a folder named zoo.staff and that folder is where module-info goes.

Tricky, I know
 
taylan istanbul
Greenhorn
Posts: 11
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator

Thanks for clear explanation Jeanne,

"The directory structure would be a valid module if module-info.java were added
directly underneath zoo.staff."

As you mentioned the tricky part is (zoo.staff) which is supposed to represent zoo\staff but
it is a top level directory of the project !

Have a nice day,
 
Jeanne Boyarsky
author & internet detective
Posts: 40798
829
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
Right. Sneaky I know. But now you'll remember this fact forever and be sure to get it right on the real exam .
 
reply
    Bookmark Topic Watch Topic
  • New Topic