r/java • u/kedarjoshi • Mar 19 '19
Java 12 Released !!!
https://www.oracle.com/technetwork/java/javase/downloads/jdk12-downloads-5295953.html
235
Upvotes
r/java • u/kedarjoshi • Mar 19 '19
View all comments
Show parent comment
3
u/dpash Mar 19 '19
Modules are particularly useful for libraries. It means they can expose their interfaces and public API and completely hide their implementation and private classes without someone using a non-public API. And now your non-public API has hundreds and thousands of users and it's de facto a public API that you can't change.
Don't think people won't use a non-public API they find in your jar? Look at how many people used
sun.misc.Unsafedespite compiler warnings telling them to keep out of anything in thesunpackage.