Answer the question
In order to leave comments, you need to log in
Answer the question
In order to leave comments, you need to log in
java has the ability to execute the code of some scripting languages. eg: javascript, groovy (scripting language for JVM).
Just like that, java code cannot be executed on the fly in a line.
ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("js");
Object result = engine.eval("4*5");
From here stackoverflow.com/questions/2605032/is-there-an-ev...
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question