View Single Post
  #1 (permalink)  
Old 11-05-2007, 10:26 PM
javaplus javaplus is offline
Member
 
Join Date: Nov 2007
Posts: 97
javaplus is on a distinguished road
try...catch block
Hi,

I am trying to explore try catch block. I know a bit about it, but I am confused a little. How can I use multiple catch blocks with a try. And whats the use of finally in try catch block?

I normally use try catch in following way:

Code:
try{ ... } catch(Exception ex) { ex.printStackTrace(); }
It serves the purpose for me but I have seen codes where developers mention a specific exception in the catch block. When to use that?

Regards.

Last edited by javaplus : 11-06-2007 at 09:18 PM.
Reply With Quote
Sponsored Links