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


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

Re: overriding with different return value type

Path csiph.com!optima2.xanadu-bbs.net!xanadu-bbs.net!feeder.erje.net!1.eu.feeder.erje.net!newsfeed.fsmpi.rwth-aachen.de!newsfeed.straub-nv.de!eternal-september.org!feeder.eternal-september.org!mx02.eternal-september.org!.POSTED!not-for-mail
From Jeff Higgins <jeff@invalid.invalid>
Newsgroups comp.lang.java.programmer
Subject Re: overriding with different return value type
Date Thu, 16 Jul 2015 10:04:47 -0400
Organization A noiseless patient Spider
Lines 16
Message-ID <mo8dqd$7gr$1@dont-email.me> (permalink)
References <mo8a4l$h99$1@speranza.aioe.org>
Mime-Version 1.0
Content-Type text/plain; charset=UTF-8; format=flowed
Content-Transfer-Encoding 8bit
Injection-Date Thu, 16 Jul 2015 14:07:09 +0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="8e164d158183579609bf09837dee5210"; logging-data="7707"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX1/kfaoLRZr9nc5vM/h63DK7Zeg2I8YQBQg="
User-Agent Mozilla/5.0 (X11; Linux x86_64; rv:31.0) Gecko/20100101 Icedove/31.7.0
In-Reply-To <mo8a4l$h99$1@speranza.aioe.org>
Cancel-Lock sha1:VhNMbkh8T2s3d4TDY4o7FSfJsu4=
Xref csiph.com comp.lang.java.programmer:32044

Show key headers only | View raw


On 07/16/2015 09:04 AM, Xue Feng wrote:
> According to the JDK manual, overriding requirs that
> (1) the same signature
> (2) the same return value type
> The following example demonstrates it:

I'm not sure what the JDK manual is.

The Java® Language Specification
Java SE 8 Edition has at least this to say
about overriding:

<http://docs.oracle.com/javase/specs/jls/se8/html/jls-8.html#jls-8.4.8>


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


Thread

overriding with different return value type Xue Feng <xf.lotus@yahoo.com> - 2015-07-16 21:04 +0800
  Re: overriding with different return value type Jeff Higgins <jeff@invalid.invalid> - 2015-07-16 10:04 -0400
  Re: overriding with different return value type e.d.programmer@gmail.com - 2015-07-16 07:23 -0700
  Re: overriding with different return value type Jeff Higgins <jeff@invalid.invalid> - 2015-07-16 11:20 -0400
    Re: overriding with different return value type Lew <lewbloch@gmail.com> - 2015-07-16 17:13 -0700

csiph-web