0
Java String convertion into Integer
I have a string like str= "25+25" .What I want is convert into Integer this string so that real operation will happen to give the final result of 50
1 Answer
0
https://stackoverflow.com/questions/2605032/is-there-an-eval-function-in-java
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("js");
Object result = engine.eval("25+25");
Maybe this will help? I think this runs JS code inside a Java program