For example, in the molecule of hydrogen gas (H2), the two hydrogen atoms are bonded together by a covalent bond. Each hydrogen atom shares one of its electrons with the other hydrogen atom, resulting in a stable molecule. Similarly, in the molecule of water (H2O), the two hydrogen atoms are bonded to the oxygen atom by covalent bonds. Each hydrogen atom shares one of its electrons with the oxygen atom, and the oxygen atom shares two of its electrons with the hydrogen atoms.