Try foreach function of Iterable in Java8