How we can make copy of a java object?



How we can make copy of a java object?..

Answer / Abhishek Tiwari

We can make a copy of a Java object by using the Cloneable interface and implementing its clone() method, or by using Java serialization with ObjectOutputStream and ObjectInputStream classes.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More Core Java Interview Questions

Is null false in java?

1 Answers  


Difference between string, stringbuffer and stringbuilder?

1 Answers  


what is collections in java?

4 Answers  


Explain java coding standards for interfaces?

1 Answers  


What are the kinds of polymorphism?

1 Answers  


This is related to threads. I have a class with synchronized method m1(). Can I create different instances of this class and execute the m1() for different threads?

3 Answers  


What are inbuilt functions?

1 Answers  


What is the difference between heap and stack memory?

1 Answers  


Define how can we find the actual size of an object on the heap?

1 Answers  


How many classes can any class inherit java?

1 Answers  


What is meant by serialisation and deserialisation?

4 Answers  


Implement two stacks using a single array.

1 Answers   Global Logic,


Categories