aspose file tools
The moose likes Beginning Java and the fly likes clone() method over ridding Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply Bookmark "clone() method over ridding" Watch "clone() method over ridding" New topic
Author

clone() method over ridding

ravikdcs dixit
Greenhorn

Joined: Aug 27, 2008
Posts: 3
override clone() method such that:-
1. we have not to implement Cloneable Interface and hence 'throw' statement
2. make clone() public so that can be used anywhere
3. make 'deep copy' of references and not 'shallow copying' of references
whenever to call clone method on an object containing reference as parameter
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24081
    
  15

Hi,

Welcome to JavaRanch!

Do you have a question?


[Jess in Action][AskingGoodQuestions]
Ernest Friedman-Hill
author and iconoclast
Marshal

Joined: Jul 08, 2003
Posts: 24081
    
  15

Sending me a copy of this post by PM didn't help. What I'm saying is that this doesn't look like a question, just a number of vaguely unrelated statements. Is there something you would like us to tell you?
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: clone() method over ridding
 
Similar Threads
How do I add a object (copy) to a que or hashmap, and not a reference?
I have some vague concept about Cloneable....
Prototype Pattern
need clear solution
Clone an object and compare it with the oldest one