Answer:
This is the Archimedes Principle, using density to determine the purity of the object. Density is mass/volume. The problem for the king is he could melt the crown and see if there are any impurites that come out, but this would destroy the crown. However, if he decided to melt the crown and impurities came out during the melting process the king would know he was cheated. Even if the mass of metal is all fake, he would be able to determine how much metal (volume) he really has now that it is melted into a brick and he could weigh it. If the weight is a different weight than an equal volume of gold than the king knows he has been cheated.