How to evaluate a math expression given in string form?
I'm trying to write a Java routine to evaluate math expressions from String
values like:
"5+3"
"10-40"
"(1+10)*3"
I want to avoid a lot of if-then-else statements. How can I do this?
I'm trying to write a Java routine to evaluate math expressions from String
values like:
"5+3"
"10-40"
"(1+10)*3"
I want to avoid a lot of if-then-else statements. How can I do this?