Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

String to java code

807588Jul 21 2009 — edited Jul 22 2009
Hello,

Not sure of string to java code is the correct way to state it, but what I want to do is take a string that stores a user inputed formula (ex "1 * (2 / 3)") and put that into a variable so java does the calculation. Basically I want to go from:
String stringFormula = "1 * (2 / 3)";
to:
double formulaOutput = 1 * (2 / 3);
Any help is much appreciated. Thanks.

vyang
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Aug 19 2009
Added on Jul 21 2009
12 comments
235 views