This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import javax.script.*; | |
class Eval { | |
static ScriptEngineManager manager = new ScriptEngineManager(); | |
static ScriptEngine engine= manager.getEngineByName("js"); | |
public static void main(String args[]) { | |
System.out.println(calc(args[0])); | |
} | |
public static String calc(String line) { |