The Java compiler automatically imports the following packages: java.langjava.utiljava.iojava.mathjava.netjava.sql, java.awt, and java.swing need to be imported explicitly.
Packages automatically imported by the Java compiler
The Java compiler provides an automatic import function so that developers can You don't have to explicitly import common packages when writing code. The following lists the packages automatically imported by the Java compiler:
java.lang
java.util
java.io
java.math
java.net
java.sql
java.awt
java.swing
The above is the detailed content of What are the packages automatically imported by the compiler in Java?. For more information, please follow other related articles on the PHP Chinese website!