February 2014
Beginner
1248 pages
62h 25m
English
The example in Figs. 17.9–17.16 demonstrates various lambda and stream capabilities using a Stream<Employee>. Class Employee (Fig. 17.9) represents an employee with a first name, last name, salary and department and provides methods for manipulating these values. In addition, the class provides a getName method (lines 69–72) that returns the combined first and last name as a String, and a toString method (lines 75–80) that returns a formatted String containing the employee’s first name, last name, salary and department.
Read now
Unlock full access