How to do mathematical calculation in java based on user input string?
<blockquote>
  <p><strong>Possible Duplicate:</strong><br>
  <a href="http://stackoverflow.com/questions/962778/converting-inserted-string-to-a-compilable-expression">Converting inserted string to a compilable expression</a><br>
  <a href="http://stackoverflow.com/questions/3260532/how-can-i-evaluate-a-mathematical-function-in-java">How can I evaluate a mathematical function in Java?</a>  </p>
</blockquote>



<p>The user enters some math syntaxes and the program should evaluate the string and the print the result. I know, this is going to be very long, <strong>so I just want to know how should I start doing this program</strong>, assuming the user input string is a validate mathematical syntax - e.g. "23+2*4"</p>

<p>I just started writing java program from few months ago, so I am fairly new to these kind of things in java.</p>

<p>So, how should I evaluate this (example) string, "23+2*4" ? - which should be "31".
I am not asking anyone to write the WHOLE code for me. I just want to know how I should get started so any examples are most welcomed.</p>

<p>Thank you,</p>
