Java provides the keyword import to indicate that you want to use a package or a class from a package. For example, to use the java.io.File class, you must have the following import statement:
import java.io.File; public class Demo { //... }
5.30.import | ||||
5.30.1. | Importing Other Classes | |||
5.30.2. | import statements | |||
5.30.3. | import all classes | |||
5.30.4. | fully qualified name |