Source: https://perso.univ-rennes1.fr/thierry.duval/Documents/SupportsDeCours/ihmjava2010_8.pdf