What will happen to its density?

A metal rod is melted and the whole mass of rod is cast in the shape of cube. What will happen to its density?

In both the cases, the volume displaced by the metallic rod and cube will be same. So, mass per unit volume does not change. Hence, the density of both cube and cylinder will be same.