Different ways to create copy of an object.
1. by passing values: https://youtu.be/GvBFu6J1mdU
2. copy constructor: https://youtu.be/83pEI6b5zMQ
3. By using clone() method of java.lang.Object class : https://youtu.be/baLAQB8zejo
4. Shallow copy : https://youtu.be/A5QbxGvpRKU
No comments:
Post a Comment