Posted by Philippe Benoit on September 12, 19100 at 21:49:06:
I have a question..
Lets say you want to use try..catch to pinpoint the error when someone enter a letter instead of an integer.
I use
try {
int number = Integer.parseInt(StdIn.readLine());
}
catch(NumberFormatException)...
yet when I compile it does not seem to aknowledge my int number.
Can we use try-catch only with method calls??
ex:
try{
liver.spleen();
}....