I'm using IntelliJ and JDK 11. In the library packages, I see two types of package naming. java.* and jdk.* like shown in the below image:

The jdk.* packages have sun.* packages inside them. What does this mean to developers? Is the general advice to avoid using jdk.*/sun.* as written over here: https://www.oracle.com/java/technologies/faq-sun-packages.html ?
You are misreading: these are not packages, but modules.
You should use java.* modules and avoid jdk.* because their access/api are not guaranteed to be stable. sun (and com.sun.*) are mostly moved into jdk.* modules.
This all boils down to the JEPs:
The modular structure of the JDK implements the following principles:
Standard modules, whose specifications are governed by the JCP, have names starting with the string "
java.".All other modules are merely part of the JDK, and have names starting with the string "
jdk.".
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With