William W. answered 08/25/21
Experienced Tutor and Retired Engineer
Buoyancy is defined by the amount of displaced water. It is called Archimedes Principle. So, anything that displaces a certain amount of water will have an upwards force applied to it equal to the weight of the water it displaces. The object itself will have a weight so, the question of whether or not it floats is a question of which is more, the weight of the object (force pulling it down) vs the weight of the displaced water (force pushing it up).
If a glass is completely full of water, and you set it down into the water, then the water displaced and the weight of the water in the glass are almost the same (the only difference is the thickness of the glass itself). So, the "decision maker" on whether or not it floats is the weight of the glass itself compared to the weight of an equivalent "water glass". Since the density of glass is about 2.9 g/cm3 and the density of water is about 1 g/cm3 then it will sink (glass weighs more than the water). If the container were made of oak, since the density of oak is about 0.7 g/cm3 then an oak cup filled with water would float.
You can google "Archimedes Principle" to learn more about it.