jherald
jherald
jherald
This is telling you that the String text2 contains a single space and that's it. This is not a valid integer. To handle bad input, you can use a try/catch block.Originally posted by Jherald Lacambra:
int num = Integer.parseInt(text2);
the error generated was:
java.lang.NumberFormatException: For input string: " "
jherald
jherald
Did you see how Paul cut 87% off of his electric heat bill with 82 watts of micro heaters? |