Java-Modules-JPMS-CheatSheet
Java-Modules-JPMS-CheatSheet copied to clipboard
[Question] Modules vs Private
Thanks for your cheatsheet!
You say that "In pre-Java 9 world any public class was available everywhere and could be used by any other class". Preventing access to a class is often cited as one of the advantages of Java 9 modules. Do you know why the existingprivate keyword is not enough when willing to prevent usage of a class?
Beside this I often wonder why one would want to hide code in a world where 99% of dependencies come from open source projects!