Globant interview question

Java 8