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


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

Why it necessary to implement clonealbe interface?

Path csiph.com!eternal-september.org!feeder.eternal-september.org!aioe.org!.POSTED!not-for-mail
From Xue Feng <xf.lotus@yahoo.com>
Newsgroups comp.lang.java.programmer
Subject Why it necessary to implement clonealbe interface?
Date Tue, 24 Nov 2015 23:28:00 +0800
Organization Aioe.org NNTP Server
Lines 10
Message-ID <n31vi5$dkg$1@speranza.aioe.org> (permalink)
NNTP-Posting-Host X4cfPbxD5+dSNGlF5M/xUQ.user.speranza.aioe.org
Mime-Version 1.0
Content-Type text/plain; charset=gbk; format=flowed
Content-Transfer-Encoding 7bit
X-Complaints-To abuse@aioe.org
User-Agent Mozilla/5.0 (Windows NT 6.1; WOW64; rv:38.0) Gecko/20100101 Thunderbird/38.3.0
X-Notice Filtered by postfilter v. 0.8.2
X-Mozilla-News-Host news://nntp.aioe.org:119
Xref csiph.com comp.lang.java.programmer:33193

Show key headers only | View raw


A class has to implement cloneable interface, otherwise its object can 
not be cloned. IMO, it is enough that a class clone itself by inheriting 
the clone method from Object class. It is somewaht reduntant to 
implement cloneable interface. Actually, there is nothing in cloneable 
interface. Namely, it is defined as follows:

interface cloneable {
}

I wonder the reason for this design. Any explanation? Thanks.

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


Thread

Why it necessary to implement clonealbe interface? Xue Feng <xf.lotus@yahoo.com> - 2015-11-24 23:28 +0800
  Re: Why it necessary to implement clonealbe interface? Eric Sosman <esosman@comcast-dot-net.invalid> - 2015-11-24 11:03 -0500
    Re: Why it necessary to implement clonealbe interface? Arne Vajhøj <arne@vajhoej.dk> - 2015-11-24 19:49 -0500
      Re: Why it necessary to implement clonealbe interface? Eric Douglas <e.d.programmer@gmail.com> - 2015-11-25 11:01 -0800
        Re: Why it necessary to implement clonealbe interface? Arne Vajhøj <arne@vajhoej.dk> - 2015-11-25 16:41 -0500
  Re: Why it necessary to implement clonealbe interface? Lew <lewbloch@gmail.com> - 2015-11-29 23:00 -0800

csiph-web