import java.util.Vector;
publicclass MainClass {
publicstaticvoid main(String[] argv) {
Vector<MyClass> myVec;
myVec = new Vector<MyClass>();
MyClass myClass = new MyClass();
myVec.add(myClass);
myVec.add("");
}
}
class MyClass {
}
Exception in thread "main" java.lang.Error: Unresolved compilation problem:
The method add(MyClass) in the type Vector is not applicable for the arguments (String)
at MainClass.main(MainClass.java:10)