Is it possible to execute an array of code in the form of stings? eval() does not work for I am executing this in RFT and eval is for equations not code itself.
Here is an example to show what I am getting at:
private String[] code = new String[20];
int x = 0;
code[0] = "System.out.print("Hello World\n");";
code[1] = "x++;";
code[2] = "System.out.print(x);";
for(String s : code){
//execute the string as if it were code
}
So output would be
Hello World
1