Une très bonne introduction à ce type est disponible ici : http://javabat.com/doc/ifboolean.html.
Cet exercice a été extrait pour PLM depuis l'excellent site d'exercices http://javabat.com/