Re: Inconsistent behaviour
From: Madhur Ahuja (ef_at_df.com)
Date: 10/03/04
- Next message: Madhur Ahuja: "Re: Congratulations for comp.java.lang.progammer newsgroup !"
- Previous message: Tony Morris: "Re: URGENT! Convert char[] array into a String"
- In reply to: Razvan: "Inconsistent behaviour"
- Next in thread: Tor Iver Wilhelmsen: "Re: Inconsistent behaviour"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Date: Mon, 4 Oct 2004 03:27:18 +0530
Razvan <mihai11@mailcity.com> wrote:
> Hi !
[snip]
> The second version does not compile ! Compiler error:
>
> SimpleJava.java:19: exception java.io.IOException is never thrown in
> body of corresponding try statement
> catch(IOException ee) {
>
>
> Compiler error or expected behavior ?
This is taken from one of the earlier post:
To be able to catch a checked exception a method inside the try block
must declare that it throws that exception (or one derived from it).
> Regards,
> Razvan
-- Madhur Ahuja [madhur<underscore>ahuja<at>yahoo<dot>com] Homepage http://madhur.netfirms.com
- Next message: Madhur Ahuja: "Re: Congratulations for comp.java.lang.progammer newsgroup !"
- Previous message: Tony Morris: "Re: URGENT! Convert char[] array into a String"
- In reply to: Razvan: "Inconsistent behaviour"
- Next in thread: Tor Iver Wilhelmsen: "Re: Inconsistent behaviour"
- Messages sorted by: [ date ] [ thread ] [ subject ] [ author ]
Relevant Pages
|