1. This site uses cookies. By continuing to use this site, you are agreeing to our use of cookies. Learn More.

how to handle the exceptions and in how many ways

Discussion in 'Java' started by nicemothi, Nov 15, 2007.

  1. nicemothi

    nicemothi New Member

    Joined:
    Nov 5, 2007
    Messages:
    5
    Likes Received:
    0
    Trophy Points:
    0
    Occupation:
    Software Engineer
    Location:
    Hyderabad
    What is the basic difference between the 2 approaches to exception handling.
    1> try catch block and
    2> specifying the candidate exceptions in the throws clause?
    When should you use which approach?
     
  2. shabbir

    shabbir Administrator Staff Member

    Joined:
    Jul 12, 2004
    Messages:
    15,283
    Likes Received:
    364
    Trophy Points:
    83
    I don't see the second method as the way to handle exception but its a way to throw exception.
     

Share This Page