Path: csiph.com!newsfeed.hal-mli.net!feeder3.hal-mli.net!newsfeed.hal-mli.net!feeder1.hal-mli.net!feeder.erje.net!eu.feeder.erje.net!news-1.dfn.de!news.dfn.de!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail From: Robert Klemme Newsgroups: comp.lang.java.programmer Subject: Re: Need help,homework Date: Fri, 14 Dec 2012 08:03:58 +0100 Lines: 25 Message-ID: References: <50c93283$0$285$14726298@news.sunsite.dk> Mime-Version: 1.0 Content-Type: text/plain; charset=windows-1252; format=flowed Content-Transfer-Encoding: quoted-printable X-Trace: individual.net bgn+BuYCvqkd0Uc/xOYlyQJUFxLxv0P1Yjep/MtUMNkjEE6p79g848DaUWEMsLdc0= Cancel-Lock: sha1:AdG8kXzt1ns592/H8t7h/eF9KTo= User-Agent: Mozilla/5.0 (X11; Linux i686; rv:17.0) Gecko/17.0 Thunderbird/17.0 In-Reply-To: <50c93283$0$285$14726298@news.sunsite.dk> Xref: csiph.com comp.lang.java.programmer:20318 On 12/13/2012 02:42 AM, Arne Vajh=F8j wrote: > On 12/11/2012 9:37 PM, Roedy Green wrote: >> http://mindprod.com/jgloss/interface.html > > #The throws clauses about Exceptions in the interface=92s methods must > #exactly match the throws clauses of the implementing methods. > > No. > > The implementing method can not throws an exception not in > the interface, but it does not need to throws all exceptions > in the interface. The implementing class can choose to declare a more restrictive = throws clause, which means, sub classes of declared exceptions in the=20 interface as well as a shorter throws clause. And it is allowed to=20 throw all exceptions which are mentioned in the throws clause or sub=20 classes of them. Kind regards robert