Win a copy of Pro Spring MVC with WebFlux: Web Development in Spring Framework 5 and Spring Boot 2 this week in the Spring forum!
  • 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

CSG Ch-17 Q-14: Slight confusion regarding usage of requires in module-info.java file

 
Ranch Hand
Posts: 32
6
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
I'm a tad bit confused here. When we use the requires keyword in a module-info.java file, we mention the name of the module that we need right?
Here in this question, the correct answers are listed as B, E and F. However, Shouldn't E and F be requires magic.helper instead of requires magic.util since the question mentions magic.util being the package inside the magic.helper module?
I'd appreciate any help.
Capture.PNG
[Thumbnail for Capture.PNG]
 
Sheriff
Posts: 9680
42
Android Google Web Toolkit Hibernate IntelliJ IDE Spring Java
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
The question says that "For simplicity, let's give each module the same name as the package". The question doesn't say that the module name is magic.helper. I guess instead of making it simpler, the question made it more confusing
 
Vimugdh Lall
Ranch Hand
Posts: 32
6
Eclipse IDE Java Windows
  • Mark post as helpful
  • send pies
    Number of slices to send:
    Optional 'thank-you' note:
  • Quote
  • Report post to moderator
Oh, well that makes sense. I guess I was just confused because earlier the question mentioned "The magic.helper module..." and then there was that line that you mentioned. Got it. Thanks man.
 
You firghten me terribly. I would like to go home now. Here, take this tiny ad:
Thread Boost feature
https://coderanch.com/t/674455/Thread-Boost-feature
reply
    Bookmark Topic Watch Topic
  • New Topic