forked from JavaTX/JavaCompilerCore
19 lines
384 B
Plaintext
19 lines
384 B
Plaintext
|
import java.util.Vector;
|
||
|
import java.lang.Integer;
|
||
|
import java.lang.String;
|
||
|
//import java.lang.Byte;
|
||
|
//import java.lang.Boolean;
|
||
|
|
||
|
public class VectorAdd {
|
||
|
|
||
|
add(v1, v2) {
|
||
|
var ret = new Vector();
|
||
|
var i = 0;
|
||
|
var erg;
|
||
|
while(i < v1.size()) {
|
||
|
erg = v1.elementAt(i) + v2.elementAt(i);
|
||
|
ret.addElement(erg);
|
||
|
}
|
||
|
return ret;
|
||
|
}
|
||
|
}
|