Java - generating conditions from string
<p>I'm trying to generate some conditions using string i get as input.<br>
For example, i get as in put the string "length = 15" and i want to create from that the condition:
length == 15.
To be more specific, i have an int in my program called length and it is set to a specific value.<br>
i want to get from the user a conditon as input ("length &lt; 15" or "length = 15"....) and create an if statement that generates the condition and test it.<br>
What is the best way of doing that?<br>
Thanks a lot<br>
Ben</p>
