wood burning stoves 2.0*
The moose likes Beginning Java and the fly likes Copy an object Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Android Security Essentials Live Lessons this week in the Android forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Copy an object" Watch "Copy an object" New topic
Author

Copy an object

Tom Liu
Greenhorn

Joined: Feb 08, 2005
Posts: 4
How do I make an exact copy of an object?

Thank you!
Ben Souther
Sheriff

Joined: Dec 11, 2004
Posts: 13410

Object.clone()
http://java.sun.com/j2se/1.4.2/docs/api/java/lang/Object.html


Java API J2EE API Servlet Spec JSP Spec How to ask a question... Simple Servlet Examples jsonf
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

You may also want to read about cloning here:
http://www.faqs.org/docs/think_java/TIJ319.htm


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Copy an object
 
Similar Threads
why clone() ?
Seminar: Agile, Dynamic Programming with Groovy and Grails - July 13th
shallow copy and deep copy
How can i make a class Immutable if it has an instance variable of java.lang.Object?
Save a HttpServletResponse