17 lines
283 B
Java
17 lines
283 B
Java
import java.util.Vector;
|
|
import java.lang.Integer;
|
|
|
|
|
|
public class VectorAdd {
|
|
vectorAdd(v1, v2) {
|
|
var i = 0;
|
|
v1 = new Vector<Integer>();
|
|
var erg = new Vector<>();
|
|
while (i < v1.size()) {
|
|
erg.addElement(v1.elementAt(i) + v2.elementAt(i));
|
|
i++;
|
|
}
|
|
return erg;
|
|
}
|
|
}
|