Source: https://perso.univ-lyon1.fr/hamid.ladjal/M2CCI_JAVA/Supports/CM4_JAVA.pdf