I have a function which saves Android data in sqlite but I have to convert the String data to an Integer.
sqlite
String
Integer
Whenever the S
S
Your function should work fine only when the param is an empty string instead of null If the param is empty string ,Integer.parseInt would throw a NumberFormatException instead of return 0
string
Integer.parseInt
NumberFormatException