MCQs > IT & Programming > Java > You have a variable of named employees of type List containing multiple entries. The Employee type has a method getName() that returns te employee name. Which statement properly extracts a list of employee names?

Java MCQs

You have a variable of named employees of type List containing multiple entries. The Employee type has a method getName() that returns te employee name. Which statement properly extracts a list of employee names?

Answer

Correct Answer: Employees.stream().map(Employee::getName).collect(Collectors.toList());

Explanation:

Note: This Question is unanswered, help us to find answer for this one

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it

search

Java Skill Assessment

Overall Skill Level-Poor

Your Skill Level: Poor

Retake Quizzes to improve it