13.7 - Creating and Using Modules – Example
Enroll to start learning
You’ve not yet enrolled in this course. Please enroll for free to listen to audio lessons, classroom podcasts and take practice test.
Practice Questions
Test your understanding with targeted questions
What directive is used to specify module dependencies?
💡 Hint: Think about what you need to indicate when a module uses another.
What filename must be present for Java modules?
💡 Hint: It is the descriptor file for the module.
4 more questions available
Interactive Quizzes
Quick quizzes to reinforce your learning
What file must a Java module include at its root?
💡 Hint: Think about the naming convention for descriptor files.
True or False: The 'exports' directive allows access to any package within the module.
💡 Hint: Consider how specific the module's access controls are.
1 more question available
Challenge Problems
Push your limits with advanced challenges
Design a new module called 'com.logger' that requires 'java.logging' and exports a package called 'com.logger.api'. Write the corresponding module-info.java file.
💡 Hint: Consider which functionalities you need from java.logging.
Explain the impact of using 'exports' vs not using it within module-info.java on module accessibility.
💡 Hint: Think about internal APIs versus public APIs.
Get performance evaluation
Reference links
Supplementary resources to enhance your learning experience.