• Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

catch(Exception e){}

 
Jayasri Alaparthi
Ranch Hand
Posts: 67
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
Posts: 12084
29
Chrome Java Linux
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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.
 
marc weber
Sheriff
Posts: 11343
Java Mac Safari
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Try throwing an Exception in the try block, and see what happens.
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic