posted 8 years ago
Hi everyone,
I've been working on some code and am trying to get exception handling to work in a few places. But whenever i put in the try catch blocks i get a compile error. I've been looking at this for hours and still can't figure it out. Does anybody have any ideas?
Here's my compiler errors:
jbw_OfficeTest.java:35: <identifier> expected
catch(InputMismatchException){
jbw_OfficeTest.java:61: <identifier> expected
catch(InputMismatchException){
Here's my code:
I've been working on some code and am trying to get exception handling to work in a few places. But whenever i put in the try catch blocks i get a compile error. I've been looking at this for hours and still can't figure it out. Does anybody have any ideas?
Here's my compiler errors:
jbw_OfficeTest.java:35: <identifier> expected
catch(InputMismatchException){
jbw_OfficeTest.java:61: <identifier> expected
catch(InputMismatchException){
Here's my code:
posted 8 years ago
Your syntax is incorrect. Take a look at some examples in the Java exceptions tutorial, and you'll see that you are missing something.
http://java.sun.com/docs/books/tutorial/essential/exceptions/
Henry
John Weiss wrote:Here's my compiler errors:
jbw_OfficeTest.java:35: <identifier> expected
catch(InputMismatchException){
jbw_OfficeTest.java:61: <identifier> expected
catch(InputMismatchException){
Your syntax is incorrect. Take a look at some examples in the Java exceptions tutorial, and you'll see that you are missing something.
http://java.sun.com/docs/books/tutorial/essential/exceptions/
Henry
