Dynamic execution of boolean expression
807607Oct 9 2006 — edited Oct 9 2006Hi folks,
I want to execute a boolean expression dynamically, can you pls help me how to do it.
For example,
String str = " ( X & ( Y | Z ) ) " ;
They value of X , Y or Z will be either true or false.
After replacing their value, I will get string as follow
String result = "( true & (false | true ) ".
Now I want to execute the String as boolean expression in order to get
a result as a true or false.
So, i need a solution to implement this. The expression may be simple or compound . It is so urgent waiting for your reply.
Appreciated if you provide sample code.
Thx !
With regards,
Rahul