Reputation: 4139
I have "+" and I want to use it as "if(1 + 2 == 3)"
Upvotes: 0
Views: 3966
Reputation: 44808
If you want to evaluate "1+2" as a mathematical equation: Evaluating a math expression given in string form
If you want to evaluate if(1+2==3) as an if statement, java should do that for you.
Upvotes: 2