Practice Creating and Using Modules – Example - 13.7 | 13. Java Modules and the JPMS (Java Platform Module System) | Advance Programming In Java
K12 Students

Academics

AI-Powered learning for Grades 8–12, aligned with major Indian and international curricula.

Professionals

Professional Courses

Industry-relevant training in Business, Technology, and Design to help professionals and graduates upskill for real-world careers.

Games

Interactive Games

Fun, engaging games to boost memory, math fluency, typing speed, and English skills—perfect for learners of all ages.

Practice Questions

Test your understanding with targeted questions related to the topic.

Question 1

Easy

What directive is used to specify module dependencies?

💡 Hint: Think about what you need to indicate when a module uses another.

Question 2

Easy

What filename must be present for Java modules?

💡 Hint: It is the descriptor file for the module.

Practice 4 more questions and get performance evaluation

Interactive Quizzes

Engage in quick quizzes to reinforce what you've learned and check your comprehension.

Question 1

What file must a Java module include at its root?

  • module-info.class
  • module-info.java
  • module.config

💡 Hint: Think about the naming convention for descriptor files.

Question 2

True or False: The 'exports' directive allows access to any package within the module.

  • True
  • False

💡 Hint: Consider how specific the module's access controls are.

Solve 1 more question and get performance evaluation

Challenge Problems

Push your limits with challenges.

Question 1

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.

Question 2

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.

Challenge and get performance evaluation