The water of mass equal to the mass of the ice cube will take less volume compared to the ice cube. The water will not overflow when the ice melts because the ice will displace the space it would take if it were in a liquid state.