标签:ati nts https java 字符 man hid ida csharp tac
// 字符串的运算公式直接转计算结果 public static void main(String[] args) {
ScriptEngine se = new ScriptEngineManager().getEngineByName("JavaScript");
String str = "2*3-45/5+9+9%5";
try {
Double d = (Double) se.eval(str);
System.out.println(d);
} catch (ScriptException e) {
e.printStackTrace();
}
}
标签:ati nts https java 字符 man hid ida csharp tac
原文地址:https://www.cnblogs.com/wdw31210/p/9512924.html