aspose file tools
The moose likes Beginning Java and the fly likes Copy an object Big Moose Saloon
  Search | Java FAQ | Recent Topics
Register / Login


JavaRanch » Java Forums » Java » Beginning Java
Reply 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://zeroturnaround.com/jrebel - it saves me about five hours per week
 
subject: Copy an object
 
Similar Threads
Seminar: Agile, Dynamic Programming with Groovy and Grails - July 13th
shallow copy and deep copy
why clone() ?
Save a HttpServletResponse
How can i make a class Immutable if it has an instance variable of java.lang.Object?