how to use import in java code example
Example 1: java import
import java.util.* //imports entire utility package
import java.util.scanner // imports just the scanner object
public class CheeseBurgerOrderer {
public static void main(String[] args) {
// code body
}
}
Example 2: import in java
If you use a package declaration, it must be the first thing in your Java file,
and the import declarations must be put immediately after it.