Answer :
The density of an object can change if either the mass or the volume has changed.
An items density is its mass divided by its volume. So if you change the shape and the mass and volume remain the same the density does not change but if you change the volume and/or mass then the density will change.