Hello guys, suppose you have a list of objects, List and you want to convert that to a Map, where a key is obtained from the object and value is the object itself, how do you do it by using Java 8 stream and lambda expression? Prior to Java 8, you can do this by iterating through the List and populating the map by keys and values. Since it's an iterative approach and if you are looking for a functional solution then you need to use the stream and lambda expression, along with some utility classes like Collectors, which provides several useful methods to convert Stream to List, Set, or Map.