import
■ You must place import statements second after any package statement, but before any
class statement.
■ You cannot place import statements within classes or after them. So no import statements at the bottom.
■ import statements are never actually required. You can explicitly specify the package for each occurrence of a class referenced in the program statements, if you wish. i.e.
The import approach works:
import
java.util.*; or import
java.util.Vector;
public
class ImportApproach {
Vector
V = new Vector( );
}
The explicit naming approach also works:
public
class ExplicitApproach {
java.util.Vector
V = new java.util.Vector( );
}