Algorithms - transformation code example
Example: Algorithms - transformation
// 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;
}