What is wrong with Vector?

Basker Franck-G17825 Franck.Basker@motorola.com
Thu Dec 21 14:39:00 GMT 2000


Hi,
this is the java code I try to compile with gcj:

8<--------------------------------------------------------------
import java.util.Vector;
class Test {
	public static void main(String[] args) {
		Vector v = new Vector();
		v.add(null);
	}
}
8<--------------------------------------------------------------

gcj exits with the following error:
8<--------------------------------------------------------------
Test.java: In class `Test':
Test.java: In method `main(java.lang.String[])':
Test.java:6: Can't find method `add(V)' in type `java.util.Vector'.
		v.add(null);
                 ^
1 error
8<--------------------------------------------------------------

Replacing add() with addElement() works!
Any suggestion?



More information about the Java mailing list