Let´s say that I have the following variable definition:
String strCondition = "x > 0";
Is it possible to apply such a condition using the variable "strCondition"? For example, if I want to use the condition in an "if" statement I would normaly write:
if (x > 0)
But my issue is that the condition can be anything (x > 0, x <= 10, x == -1, etc). If I could do something like:
if (strCondition)
and replace strCondition with its contents to finally process "if (x > 0)"
I hope my question is clear enough. I will appreciate any feedback.