Question d’entretien chez J.P. Morgan

Java Snippets: Asked for the output