My Try Catch Function Won't Work As Expected
My program is supposed to take the given value and find the other value with it. However, my try catch statement doesn't seem to be working. It never does the first 2 if statements
Solution 1:
As i understood,
(pounds_find).getText().toString().trim().length() <=0
or
(length_find).getText().toString().trim().length() <=0
is true only when user hasn't input anything. if he has, then 3rd "if" execute as expected. But when user hasn't input anything then
int length_int = Integer.parseInt(length_find.getText().toString());
int pounds_int = Integer.parseInt(pounds_find.getText().toString());
cannot be done. because it is empty. I think that's the case here. If that isn't please let me know. If i'm wrong sorry. That's what i understood from here. If you could debug and be specific about scenario or exception if it throw any, that would be more helpful
Post a Comment for "My Try Catch Function Won't Work As Expected"