Possible Duplicate:
Is there a java equivalent of the python eval function?
There is a String, something like String str = "if a[0]=1 & a[1]=2"
. How to use this string in a real IF THEN expression? E.g.:
for (Integer[] a : myNumbers) {
if a[0]=1 & a[1]=2 { // Here I'd like to use the expression from str
//...
}
}