Android : use input numbers for calculation : Android

on Friday, July 4, 2014


I'm new to programming and I'm developing a simple android app. In the app there is a input editText to enter a number and I need to use that value for further calculation.



int usedUnits = Integer.parseInt(units.getText().toString());


I used above code for convert string to integer but when I'm writing formula I cannot use that value. as a suggestion it says make it "final" but when it make "final" there is no compilation error but there is some runtime error occurred. How can I solve this?? any suggestions??


0 comments:

Post a Comment