Once you have imported an entire package, or just one compilation unit,
from a package, you can refer by name to the single public class in each
compilation unit. For example, once you have loaded the
onto.java.entertainment
package, you can refer to the various public
classes found in the compilation units:
import onto.java.entertainment.*; import java.io.*; import java.util.*; public class Demonstrate { public static void main(String argv[]) { Vector mainVector; mainVector = Auxiliaries.readMovieFile("input.data"); for (Iterator i = mainVector.iterator(); i.hasNext();) { System.out.println(((Movie)(i.next())).rating()); } } }