Boolean Expression Evaluation in Java
- by Trilok
Hey everyone,
Is there a relatively simpler (when compared with writing a parser) way to evaluate boolean expressions in Java?
I do not want to use the JEP library.
I have a String expression something like:
(x 4 || x < 8 && p 6) [ I will replace the variables with values.
Is there a way by which I can evaluate this expression?
The problem is, this can be any level deep. So, writing a parser would be really complex.
Thanks