"throws" or "try" statements??
From: JS (dsa._at_asdf.com)
Date: 01/13/05
- Next message: Eric Sosman: "Re: "throws" or "try" statements??"
- Previous message: Oscar kind: "Re: Comment behaviour"
- Next in thread: Eric Sosman: "Re: "throws" or "try" statements??"
- Reply: Eric Sosman: "Re: "throws" or "try" statements??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Thu, 13 Jan 2005 20:25:20 +0100
I have mad a I/O program containing som methods that might throw
IOException. First time I made these methods I used "try/catch" staments to
catch and handle these exception.
But now I just tried to write "throws IOException" in the header line in
some of the methods and that also works!
I prefer the last kind of code because its more simple, is it just a matter
of choice what you do or are there some differences? It works either way
- Next message: Eric Sosman: "Re: "throws" or "try" statements??"
- Previous message: Oscar kind: "Re: Comment behaviour"
- Next in thread: Eric Sosman: "Re: "throws" or "try" statements??"
- Reply: Eric Sosman: "Re: "throws" or "try" statements??"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]