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 th…