I need to implement function public int eval(String infix) {...}
and when I use this like this:
eval("3+2*(4+5)")
I must receive 21.
The arithmetic expression can contain '+', '*' and parentheses.
So, how can I convert this to math equation? I can't use non-standard libs.
UPDATE: Solution found.
It is 2 way: Polish Notation and using ScriptEngine.