File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Java in General and the fly likes Clonable interface Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Clonable interface" Watch "Clonable interface" New topic

Clonable interface

MaheshS Kumbhar
Ranch Hand

Joined: Sep 24, 2009
Posts: 188
As a curiosity I just wanted to know what are the scenario's where clonable interface can be used?

I am slow but sure
Wouter Oet
Saloon Keeper

Joined: Oct 25, 2008
Posts: 2700

To indicate that an instance of that class can be cloned.

"Any fool can write code that a computer can understand. Good programmers write code that humans can understand." --- Martin Fowler
Please correct my English.
MaheshS Kumbhar
Ranch Hand

Joined: Sep 24, 2009
Posts: 188
I know that Clonable interface is used to clone the object on which clone method is called. But which are the idle situations where clonable is likely to be used to clone the object. Because I read in javadoc that said to avoid using clonable interface or use it carefully.
Campbell Ritchie

Joined: Oct 13, 2005
Posts: 46412
Please search; there was a question about Cloneable earlier this week.
I agree. Here's the link:
subject: Clonable interface
It's not a secret anymore!