# Two different electronic configurations for cerium

Depending on the textbook there are two different electronic configurations stated for cerium. On the one hand

$$[\ce{Xe}]\mathrm{4f^15d^16s^2}\quad$$

and on the other hand

$$[\ce{Xe}]\mathrm{4f^26s^2}$$

Are both configurations possible? If not, why so?