We discuss universality in random matrix theory and in the study of Hamiltonian partial differential equations. We focus on universality of critical behavior and we compare results in unitary random matrix ensembles with their coun- terparts for the Korteweg–de Vries equation, emphasizing the similarities between both subjects.