aspose file tools*
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
JavaRanch » Java Forums » Certification » Programmer Certification (SCJP/OCPJP)
Bookmark "catch(Exception e){}" Watch "catch(Exception e){}" New topic
Author

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.
Thanks,
Bhargavi.
fred rosenberger
lowercase baba
Bartender

Joined: Oct 02, 2003
Posts: 11398
    
  16

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
Sheriff

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
sscce.org
 
 
subject: catch(Exception e){}