In the Review Questions, Chapter 11, question 2, the location of the module-info.java has been asked.
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)
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.