How can two items have the same mass and different volume?

These items can differ on how much space is taken up by their matter.
The gravitational pull of the two items can be different.
These items can have the same density.