ScriptEngineManager manager = new ScriptEngineManager();
ScriptEngine se = manager.getEngineByName("js");
String str = "13>12&&'张三1'=='张三'";
boolean result;
try {
result = ( Boolean)se.eval(str);
System.out.println(result);
} catch (ScriptException e) {
e.printStackTrace();
}
ScriptEngine se = manager.getEngineByName("js");
String str = "13>12&&'张三1'=='张三'";
boolean result;
try {
result = ( Boolean)se.eval(str);
System.out.println(result);
} catch (ScriptException e) {
e.printStackTrace();
}