62,614
社区成员
发帖
与我相关
我的任务
分享
import bsh.EvalError;
import bsh.Interpreter;
public class Test {
public static void main(String...args) throws EvalError {
String str = "int i = 2; int j = 3;";
Interpreter bsh = new Interpreter();
bsh.eval(str);
System.out.println("i = " + bsh.get("i"));
System.out.println("j = " + bsh.get("j"));
}
}
System.out.println();