r/java • u/ProdOrDev • Jul 31 '26
JEP 401: Value Objects And JEP 539: Strict Field Initialization Merged Into JDK
https://github.com/openjdk/jdk/commit/cc278dbb8a1ca0754d5842708b9029441055d361
181
Upvotes
View all comments
Show parent comment
2
u/EvertTigchelaar Aug 01 '26
Modules are great for library developers.
Before modules you didn't have a good way to have classes only accessible to your library classes. You could have a package name like org.mylib.internal and hope that users wouldn't use classes from that package. With modules you just export the packages your want.