public class MyTest
{
public static void main(String[] args) throws ParseException, EvalError
{
String s= "2001>1000&&2001<3000";// 这里你可以自己拼一下字符串
Interpreter bs = new Interpreter();
System.out.println(bs.eval(s));
}
}
记得引入:bsh-core-2.0b4.jar包