 He was born as the oldest son and child of Crown Prince Frederick of Denmark and his wife Louise of Sweden, only surviving child of King Charles XV of Sweden.He was baptised in the Chapel of Christiansborg Palace on 31 October 1870 by the Bishop of Zealand, Hans Lassen Martensen.After passing the studenter-eksamen (the university entrance examination in Denmark) in 1889 as the first Danish monarch, he started a military education as was customary for princes at that time, and subsequently served with the 5th Dragoon Regiment and later studied at the Officers Academy in Randers from 1891 to 1892.