• 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
  • Paul Clapham
  • Ron McLeod
  • Tim Cooke
  • Junilu Lacar
Sheriffs:
  • Rob Spoor
  • Devaka Cooray
  • Jeanne Boyarsky
Saloon Keepers:
  • Jesse Silverman
  • Stephan van Hulst
  • Tim Moores
  • Carey Brown
  • Tim Holloway
Bartenders:
  • Jj Roberts
  • Al Hobbs
  • Piet Souris

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: 9691
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.
 
Don't get me started about those stupid light bulbs.
reply
    Bookmark Topic Watch Topic
  • New Topic