View All num of num Add Photos Indus Valley Consultants www.indusvalley.com Unclaimed Profile Overview Reviews Salaries Interviews Jobs Photos Benefits 8 Reviews 741 Salaries 2 Interviews Follow Add Interview Follow Add Interview Interview Question Software Engineer Interview Indus Valley Consultants What are the different ways to clone an object?? Tags: See more , See less 8 Answer Add Tags Answer Interview Answer 1 Answer ▲ 1 ▼ There's two fundamental ways: shallow copy and deep copy.Shallow copy basically only copies a reference to the original object. It's only used with classes; anything representing a structure or a value type can't be shallow copied. With this copy, you end up with two addresses in memory that contain a pointer to the same object. All properties and fields associated with this object will be shared between the copies; when a value changes via the use of one pointer, the value will simultaneously change for the other pointer.Deep copy means to duplicate every bit of data that represents a class or structure. It produces a value that, when modified, does not modify the original. Julius on Apr 3, 2010 Interviews > Software Engineer > Indus Valley Consultants Add Answers or Comments To comment on this, Sign In or Sign Up.