This tutorial outlines the API collector Collectors.toMap() which is used in the terminal operation collect(). Three separate code examples are detailed.
The full Streams playlist is here: • Playlist
0:00 Introduction
1:09 Collectors.toMap() example 1
2:41 Collectors.toMap() example 2
4:54 Collectors.toMap() example 3