📜  算法 - 转换 - Java 代码示例

📅  最后修改于: 2022-03-11 14:52:48.754000             🧑  作者: Mango

代码示例1
// give back only names
public List getNames(List employees) {
    List names = new ArrayList<>();
    for (Employee employee: employees) {
        names.add(employee.getName());
    }
    return names;
}