This is the mail archive of the
java-discuss@sources.redhat.com
mailing list for the Java project.
What is wrong with Vector?
- To: "'java-discuss at sources dot redhat dot com'" <java-discuss at sources dot redhat dot com>
- Subject: What is wrong with Vector?
- From: Basker Franck-G17825 <Franck dot Basker at motorola dot com>
- Date: Thu, 21 Dec 2000 15:38:08 -0700
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?