When I run parseInt:
Integer.parseInt(myString);
it throws:
NumberFormatException: For input string: \"\"
I don't know why was I searching for this but here's the easy way:
int test=str.isEmpty()?0:Integer.parseInt(str);