View Single Post
Old May 2nd, 2008, 1:49 PM   #8
Ezzaral
Newbie
 
Join Date: Apr 2008
Posts: 7
Rep Power: 0 Ezzaral is on a distinguished road
Re: Java Error Messages

Your try-catch on NumberFormatException really only needs to be around this portion
			resulta = Integer.parseInt(resultATF.getText());
			resultb = Integer.parseInt(resultBTF.getText());
			resultc = Integer.parseInt(resultCTF.getText());
because that is where the string values are converted to ints. The rest of the code merely operates on those int values and really has no bearing on NumberFormatException. It certainly doesn't need to throw one explicitly.
Ezzaral is offline   Reply With Quote