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


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

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 11:20:36 -0400
Organization A noiseless patient Spider
Lines 30
Message-ID <mo8i8h$oi3$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 15:22:57 +0000 (UTC)
Injection-Info mx02.eternal-september.org; posting-host="8e164d158183579609bf09837dee5210"; logging-data="25155"; mail-complaints-to="abuse@eternal-september.org"; posting-account="U2FsdGVkX18wJ1OeRoDFONnKHf1m9GkpQUcnD5uW1wQ="
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:QRmDCRbP1vORy8o1Lg/EgPqDIPc=
Xref csiph.com comp.lang.java.programmer:32046

Show key headers only | View raw


On 07/16/2015 09:04 AM, Xue Feng wrote:

 >  I wonder why the clone() method  works in different way.


 From the Java™ Platform, Standard Edition 8
API Specification:

Interface Cloneable
<https://docs.oracle.com/javase/8/docs/api/java/lang/Cloneable.html>

Class Object - clone() method
<https://docs.oracle.com/javase/8/docs/api/java/lang/Object.html#clone-->

Other discussion:

Objects and Java
Chapter 8: Cloning, Collections, and Inner Classes
<https://www.artima.com/objectsandjava/webuscript/ClonCollInner1.html>

Josh Bloch on Design
Copy Constructor versus Cloning
<http://www.artima.com/intv/bloch13.html>

See Item 11: Override clone judiciously in:
Bloch, J. (2008). Effective Java. Upper Saddle River, NJ: Addison-Wesley.
<https://en.wikipedia.org/wiki/Special:BookSources/9780321356680>


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