Which two packages are automatically imported into the java source file by the java compiler?

Give:
<code>
Public Class Test {
}
</code>
Which two packages are automatically imported into the java source file by the java compiler?

Give:

Public Class Test {
}

Which two packages are automatically imported into the java source file by the java compiler?

A.
Java.lang

B.
Java.awt

C.
Javax.net

D.
Java.*

E.
The package with no name

Explanation:

For convenience, the Java compiler automatically imports three entire packages for each source file:
(1) the package with no name, (2) the java.lang package, and (3) the current package (the package
for the current file).
Note:Packages in the Java language itself begin with java. or javax.
Incorrect answers:
Java.awt: basic hierarchy of packages for native GUI components
Javax.net: networking operations, sockets, DNS lookups, etc.



Leave a Reply 0

Your email address will not be published. Required fields are marked *