When energy is added to matter its temperature will rise. The temperature rise will depend on the mass which in turn depends on its density.
Part of Combined ScienceMatter - Models and explanations