i was expecting the output to be EOFException. can someone explain plz. thanks zarina
Corey McGlone
Ranch Hand
Joined: Dec 20, 2001
Posts: 3271
posted
0
How can it print EOFException, if you don't put in the code to output the exception? You're catching the exception, so it is considered handled, unlike a runtime exception. If you change your catch block to look like this: