Solution:
CaO2
Let expect oxidation number of O is x.
\[Oxidation\text{ }number\text{ }of\text{ }Ca\text{ }=\text{ }+2\]
Then, at that point, we have:
\[\begin{array}{*{35}{l}}
1\left( +2 \right)\text{ }+\text{ }2\left( x \right)\text{ }=\text{ }0 \\
~ \\
=\text{ }2\text{ }+\text{ }2x\text{ }=\text{ }0 \\
~ \\
=\text{ }2x\text{ }=\text{ }-\text{ }2 \\
~ \\
=\text{ }x\text{ }=\text{ }-\text{ }1 \\
\end{array}\]
Henceforth, Oxidation number of O is – 1