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,355
    Likes Received:
    383
    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

  1. This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
    By continuing to use this site, you are consenting to our use of cookies.
    Dismiss Notice