forked from JavaTX/JavaCompilerCore
new file: ../../test/bytecode/javFiles/VectorAdd.jav
This commit is contained in:
parent
355df5fab7
commit
4ace3b6f92
19
test/bytecode/javFiles/VectorAdd.jav
Normal file
19
test/bytecode/javFiles/VectorAdd.jav
Normal file
@ -0,0 +1,19 @@
|
|||||||
|
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;
|
||||||
|
}
|
||||||
|
}
|
Loading…
Reference in New Issue
Block a user