if I have set text in textview in such way, which is not problem:
tv.setText(\"\" + ANS[i]);
this simply getting from this way.
You have to do the following:
a=a.replace("\n"," "); a=a.trim(); String b[]=a.split("+"); int k=Integer.ValueOf(b[0]); int l=Integer.ValueOf(b[1]); int sum=k+l;