File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Programmer Certification (SCJP/OCPJP) and the fly likes catch(Exception e){} Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of Java Interview Guide this week in the Jobs Discussion forum!
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "catch(Exception e){}" Watch "catch(Exception e){}" New topic

catch(Exception e){}

Jayasri Alaparthi
Ranch Hand

Joined: Aug 14, 2006
Posts: 67
hello friends,
In try{
catch(Exception e)
If we didn't have a statement in catch block what's the result.
fred rosenberger
lowercase baba

Joined: Oct 02, 2003
Posts: 11957

pain and suffering.

The exception gets caught, but then you do nothing with it. so your program bombs, without telling you anything. no indication why, where, or what went wrong.

the program will compile and run, and if nothing goes wrong, it looks good. but when there IS a problem, you'll pull your hair out trying to find it.

There are only two hard things in computer science: cache invalidation, naming things, and off-by-one errors
marc weber

Joined: Aug 31, 2004
Posts: 11343

Try throwing an Exception in the try block, and see what happens.

"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
I agree. Here's the link:
subject: catch(Exception e){}
It's not a secret anymore!