This is the mail archive of the java-discuss@sources.redhat.com mailing list for the Java project.


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]

What is wrong with Vector?


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?


Index Nav: [Date Index] [Subject Index] [Author Index] [Thread Index]
Message Nav: [Date Prev] [Date Next] [Thread Prev] [Thread Next]