|
|
|
|
It's a royal pain to have to fully qualify every class name in your program. So the Java folks added the import statement as a convenience: import java.util.Hashtable; // import just HashTable or: import java.util.*; // import all classes in java.util which allows the Java compiler to make a name accessible through an abbreviated name -- the class name itself (in this case Hashtable). Note: I try to discourage the use of the '*' method of importing, because I consider it bad -- often sloppy/lazy -- software engineering practice. Please don't use it, at least in my course! If you wish, you can use a mix of import statements and fully qualified references. If two packages imported in this way contain classes with the same name, you cannot use either of those classes without using the fully qualified name for each.
Note: Remember:
|
|
This page was last modified on 02 October, 2007 |