Top Categories
11.2 Object Cloning in Java Part 1
- Category:
- Sub Category:
Shallow Copy:-Shallow copy means to make a copy of the reference to obj into obj1. It is simply say that call bye value. Deep Copy:-It makes a copy of all the members of obj, allocates memory in a different location for obj1 and then assigns the copied members to obj1 to achieve deep copy.Deep Co
Shallow Copy:-Shallow copy means to make a copy of the reference to obj into obj1. It is simply say that call bye value. Deep Copy:-It makes a copy of all the members of obj, allocates memory in a different location for obj1 and then assigns the copied members to obj1 to achieve deep copy.Deep Copy means call by value. Clone:- Cloning is the process of actually making another exact replica of the object instead of its reference. Clonable interface, Object clone()