title: Turn a String into a Math Expression?
body: <p>Lets say I have a method that's declared this way:</p>
  
  <pre><code>public double Calc(String expression) {
  
  // Code
  
  }
  </code></pre>
  
  <p>I want to take a String expression like</p>
  
  <pre><code>"2 + 4 - (3 * 4)"
  </code></pre>
  
  <p>Then feed it to <code>Calc()</code> and it should return the value that it gets.</p>
  
  <p>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</p>
  
  <pre><code>return 2 + 4 - (3 * 4);
  </code></pre>
  
  <p>But that would only work for that single expression.</p>