My goal is to retrieve the mathematical value of a String. E.g:
public class Calculator {
public static void main(String args[]) {
System.out.println(Calculator.calc("3 + 2"));
}
public static double calc(String calculation) {
double result;
//Calculate
return result;
}
}
Is there a class or a library that has this functionality? If so, where could I find this.
Thanks in advance
Vincent