Case 1 (p2 = p1):
In this case, two handles, p1 and p2 will point to the same memory, so when we change any variable using handle p1, as the location is common, p2 will get the same value.
Case 2 (p2 = new p1):
This is an example of shallow copy. Here, p2 will create an exact copy of p1, so two different memories are created. Initially, both the objects have the properties with same values, but as the location are different, the change in a variable of p1 would not affect in a variable of p2.