Skip to content

[Question] Modules vs Private #1

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Open
jzy3d opened this issue Oct 11, 2021 · 0 comments
Open

[Question] Modules vs Private #1

jzy3d opened this issue Oct 11, 2021 · 0 comments

Comments

@jzy3d
Copy link

jzy3d commented Oct 11, 2021

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!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant