Using
JBEE is as straightforward to use as possible. In the simplest case all you need to do is to create a new instance of Evaluator
and call it's evaluate()
method with the desired expression:
System.out.println(new Evaluator().evaluate("1 + 1");
You will either get a result or null
if the expression cannot be parsed. If you are interested in why parsing fails, use the evaluateOrThrow()
method instead.