Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我有一个字符串格式的方程,如“45+5*4-6”,我必须用 Java 求解。
有没有办法解决字符串格式的方程?
检查Beanshell
像这样的东西应该工作 -
Interpreter ip = new Interpreter(); ip.eval("res = 45+5*4-6"); System.out.print(ip.get("res"));