QuestionQ57

Working with Java Data Types

Which statement is accurate?

  • A The --add-exports option is always recommended in a Java command.
  • B The --add-exports option is not allowed in a Java command.
  • C The --add-requires option is not allowed in a Java command.
  • D The --add-requires option is allowed but not recommended in a Java command.
Explanation

The java launcher supports --add-exports to export a package to a target module, so it is neither always recommended nor prohibited. It does not provide a --add-requires launcher option; --add-reads is the corresponding option for adding module readability.

Learn more

Community Discussion

No comments yet. Be the first to start the discussion!