// Java: List<String> list = people.stream().map(Person::getName).collect(Collectors.toList());
// Kotlin: val list = people.map { it.name } // toList() not needed