我有一个字符串格式的等式,比如"45+5*4-6“,我必须用Java来求解。
有没有办法解决字符串格式的方程?
发布于 2013-05-07 15:36:36
检查Beanshell
像这样的东西应该行得通-
Interpreter ip = new Interpreter();
ip.eval("res = 45+5*4-6");
System.out.print(ip.get("res"));
https://stackoverflow.com/questions/16413599
复制相似问题