You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
https://dev.java/learn/packages/ is out of date, doesn't mention import module added in JEP 511 in Java 25 #254
In case it is useful, I am reporting where in this tutorial it may be most helpful to add just a couple of sentences to stay up to date with the new import module feature (JEP 511) that came out in Java 25 ( https://openjdk.org/jeps/511 ).
[suggested] 4. import the entire module (all exported packages) which exports the package of which the type is a member.
as one can do module level imports, like import module java.base , which as an example,
then has "the same effect as 54 on-demand package imports, one for each of the packages exported by the java.base module. It is as if the source file contains import java.io.* and import java.util.* and so on."
It may also be useful to separately mention that in a modular application, only public types in packages exported or opened by a module are visible outside that module and also provide the reader with a link to the tutorial on modules ( https://dev.java/learn/modules/ ).
Activity
willy-b commentedon May 29, 2026
A section higher up in the same page ( https://dev.java/learn/packages/ (archived as is at https://web.archive.org/web/20260527153107/https://dev.java/learn/packages/ ) )
that gives the same listing (but without numbering) would also need to be updated the same as described above.
That is, in addition to the update described above,
separately under "Using Package Members"
is also recommended to be updated to include a 4th point
to be up to date with the new import module feature (JEP 511) that came out in Java 25 ( https://openjdk.org/jeps/511 ).