Say I have a String
String strCondition = something.contains("value") && somethingElse.equals("one");
How do I convert this String into a boolean condition so that I can be able to use it in an IF
statement?
If I use valueOf()
, will it evaluate the contents of the String?
RE-EDIT: I am not sure how to put this.
I am taking the value something.contains("value") && somethingElse.equals("one")
from a database column. If I try to assign that to boolean
variable it shows a type mismatch.