Lets say I have a method that's declared this way:
public double Calc(String expression) {
// Code
}
I want to take a String expression like
"2 + 4 - (3 * 4)"
Then feed it to Calc()
and it should return the value that it gets.
Can you Parse a Math Expression out of a String so that it becomes an expression that Java can understand? Because normally you could just write
return 2 + 4 - (3 * 4);
But that would only work for that single expression.