Algoritmos - Transformación
// give back only names
public List<String> getNames(List<Employee> employees) {
List<String> names = new ArrayList<>();
for (Employee employee: employees) {
names.add(employee.getName());
}
return names;
}
Hilarious Hippopotamus