Question d’entretien chez Oracle

Question on puzzles, and programming was asked