Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR JAVA

eval in java

ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine engine = manager.getEngineByName("js");        
Object result = engine.eval("4*5");
System.out.println("..result..."+String.valueOf(result));
Source by stackoverflow.com #
 
PREVIOUS NEXT
Tagged: #eval #java
ADD COMMENT
Topic
Name
3+4 =