Originally posted by adam lui:
first what do you wanna do?
if you want to use the ArrayList class, you get the nearly right statement, except it should be like this..
import java.util.ArrayList;
if you want to put your foo.class into the java.util.ArrayList, i dont think that is practically not possible - the compile will complain...
I am trying to understand why it would be illegal to use the import statement
With the above statement, I am NOT trying to import the class ArrayList from the java.util package. Instead, Im trying to import alle classes in the java.util.ArrayList package (which I could make myself).
I can construct an example where this is a perfectly legal import; a java file named Foo in package java.util.ArrayList. Just make the directory structure java/util/ArrayList/ with file Foo.java. It *will* work.
[ November 05, 2007: Message edited by: Johnny Klarik ]
[ November 05, 2007: Message edited by: Johnny Klarik ]