Re: How can I use try/catch?
You can always look at the Javadoc on how to use the class. You will find the description of what the class do. The description of each method including the parameters required by the method, the return type and the exception that might be thrown by those method.
For the Integer.parseInt(String s) method it throws the java.lang.NumberFormatException exception. For details you can find it here Integer (Java Platform SE 7 )
Re: How can I use try/catch?
Ah, excellent! I couldn't find that when I was searching, that's what I was looking for! Thanks :)