To implement Shallow copy and Deep copy you need to have data as collections and it should have the ability to be mutable

Problem

We think using = operator we are copying items from one variable to another variable or object but we are wrong actually what we are doing is referencing the new variable to the same variable. In short, both variables are sharing the same memory location.

Akash Borgalli

I am Azure AI Engineer.I work in Capgemini as MuleSoftDeveloper.My hobbies are listening to Music and learning new things related to AI and ML .

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store