Dear, I have an initial student array and an array of new students. How can I do to obtain an array of new students that are not in the initial student array? This using java lambdas.
UPDATE
List listaFinal = new ArrayList();
for (Alumno nuevo : listaNuevos) {
if (!listaRegistrados.stream().anyMatch(e -> e.getNombre() == nuevo.getNombre())) {
listaFinal.add(nuevo);
}
}
It works but I would like to know if there is a simpler or more intimate way. Also, I would like to know if there would be any problem if I wanted to use parallelStream