Java 8 and scala examples