shallow copy

In shallow copy, a new object B is created, and the field values of A are copied over to B. If the field value is a reference to an object, it copies the reference, hence referring to the same object as A does, and if the field value is a primitive type it copies the value of the primitive type.