Groups | Search | Server Info | Keyboard shortcuts | Login | Register [http] [https] [nntp] [nntps]


Groups > comp.lang.java.programmer > #20318

Re: Need help,homework

From Robert Klemme <shortcutter@googlemail.com>
Newsgroups comp.lang.java.programmer
Subject Re: Need help,homework
Date 2012-12-14 08:03 +0100
Message-ID <aj01auFganpU4@mid.individual.net> (permalink)
References <ka5ua2$2k8$1@dont-email.me> <udrfc8t6icar3vihtetsc1vrqss25m473l@4ax.com> <50c93283$0$285$14726298@news.sunsite.dk>

Show all headers | View raw


On 12/13/2012 02:42 AM, Arne Vajhøj 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’s 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.

<nitpick>The implementing class can choose to declare a more restrictive 
throws clause, which means, sub classes of declared exceptions in the 
interface as well as a shorter throws clause.  And it is allowed to 
throw all exceptions which are mentioned in the throws clause or sub 
classes of them.</nitpick>

Kind regards

	robert

Back to comp.lang.java.programmer | Previous | NextPrevious in thread | Next in thread | Find similar | Unroll thread


Thread

Need help,homework theunknowable@lavabit.com - 2012-12-11 00:21 +0000
  Re: Need help,homework Lew <lewbloch@gmail.com> - 2012-12-10 17:05 -0800
  Re: Need help,homework Roedy Green <see_website@mindprod.com.invalid> - 2012-12-11 18:37 -0800
    Re: Need help,homework Lew <lewbloch@gmail.com> - 2012-12-11 19:30 -0800
    Re: Need help,homework Arne Vajhøj <arne@vajhoej.dk> - 2012-12-12 20:42 -0500
      Re: Need help,homework Robert Klemme <shortcutter@googlemail.com> - 2012-12-14 08:03 +0100
        Re: Need help,homework Arne Vajhøj <arne@vajhoej.dk> - 2012-12-14 20:59 -0500

csiph-web