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
Mismatched class names in code example and compiler output example #284
In Learn Java > Organizing your Application > Modules > Strong Encapsulation (of JDK Internals), Experiments with Strong Encapsulation section, there is a code example which includes the sun.util.BuddhistCalendar class which is different to the sun.util.PreHashedMap class given in the related compiler output, as below:
Code:
// add to `main` method
IO.println(sun.util.BuddhistCalendar.class.getSimpleName());
Compiler output:
Internal.java:8: error: package sun.util is not visible
IO.println(sun.util.PreHashedMap.class.getSimpleName());
^
(package sun.util is declared in module java.base, which does not export it)
1 error
error: compilation failed
Activity