Section 17.6.4 Mapping Employees to Unique Last Name Strings

• You can map objects in a stream to different types to produce another stream with the same number of elements as the original stream.

Stream method distinct (p. 754) eliminates duplicate objects in a stream.

Get Java™ How To Program (Early Objects), Tenth Edition now with the O’Reilly learning platform.

O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.