I am developing a programmable calculator in android.I am getting user input in the form of charsequence which i then convert into string. But before i can put them in the stack i must check whether the input is an integer or a sign.
I am basically from a C++ background. So i am having issues finding the right functions to do the job. Any help would be appreciated.
Two possible solutions:
Integer.valueOf(), and catch the exception [NumberFormatException] thrown - if it is not a
number.The first is most likely to be more efficient then the second
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With