A glass marble and a piece of cork of the same shape and size are dropped in water. Which of the following explains correctly why the glass marble sinks while the cork piece floats on water?