What's the difference between requires and requires transitive statements in Java 9?
问题 What's the difference between requires and requires transitive module statements in module declaration? For example: module foo { requires java.base; requires transitive java.compiler; } 回答1: Readability recap If module bar requires module drink , then the module system... enforces the presence of drink (called reliable configuration ) allows bar to read drink (called readability) allows code in bar to access public classes in exported packages in drink (called accessibility) Exactly the same