Infomatix interview question

Java 8