問題文
Code in module alpha uses a public class from the package beta.api, and that package lives in module beta. What has to appear in the two module declarations before the code in alpha will compile?
選択肢
- The declaration of alpha has to require beta and nothing more is needed, since every one of the public classes of a required module is reachable from there
- Both declarations have to name each other with requires, because reading a package is a mutual relationship
- The declaration of alpha has to require beta and the declaration of beta has to export the package beta.api, because both of the directions are stated on purpose
- The declaration of beta has to export the package and no entry in alpha is needed, since an export names the modules that may read it