Conversion of String to integer,then again to string : I am on a project developing an app on android. Here I have to find a sum between two numbers defined as Strings and then display them on a textview. But my app is crashing.Below is my code. Is it optimal? Please Help me I have to submit it as soon as possible.



          String price=Place_View.prices[spinner1.getSelectedItemPosition()];
                String fare=Cars.SUVFare[spinner2.getSelectedItemPosition()];
                String result="";
                int calc1=Integer.parseInt(price);
                int calc2=Integer.parseInt(fare);
                int calc3=calc1+calc2;
                result=Integer.toString(calc3);
                Price.setText(result);

            }
        });