In Java, the import keyword is used to make classes and interfaces available and accessible to the current source code, without specifying fully qualified package names. For example:
import java.awt.*; import java.util.List; import java.io.File;
The first import statement makes all classes/interfaces under package java.awt accesible to the current program. It uses the * wildcard character to specify 'everything' under the package.
Likewise, the second and third import statements make the interface List and the class File available to the current source code. It uses exact names instead of wildcard.
The import statements must be placed on top of the source file, only after the package statement.
Related keyword: package. See all keywords in Java.