I have a string something like : String str="(2+(3*4))+(1+2)"; Somehow I want calculate its value in Integer format. i.e. I should be able to get 2+12+3=17. What matters for me is the End Result.
I used : str.replaceAll("\((.*?)\)", "$1"), which doesn't work properly and even I am not able to get the answer as Integer.
Can anyone Help me? Thanks in advance :)