Yes an egg or eggs will float if they're not longer fresh and no longer safe to eat.
So if the egg floats to the surface of the water the egg is bad and no longer safe to eat and could make you sick if you do eat it.
A fresh egg will sink to the bottom of the bowl of water which means the egg is very fresh and good to eat.
And if the egg sinks to the bottom and lays flat on it's side the egg is not as fresh as it was before but the egg is still safe to eat.
So that's a very easy and quick way of testing eggs for freshness and making sure the eggs are good and safe to eat.
If the egg floats to the top it's bad and should be thrown out but if the egg sinks then it's good and safe to eat.