|
Re: What is this
|
Posted: Jun 15, 2005 10:50 PM
|
|
This is practically a search list for classes.
Instead of writing everytime java.util.Vector , you can just write Vector . The compiler then uses this list to find Vector
1. the compiler looks for javax.swing.Vector --- does not exist 2. the compiler looks for java.awt.event.Vector --- does not exist 3. the compiler looks for javax.swing.border.Vector --- does not exist 4. java.util.Random --- the compiler won't look at it, because instead of including every class in java.util only the class Random is "imported" 5. the compiler looks for java.util.Vector --- found! For compilation the class java.util.Vector will be used everytime you write just Vector
|
|