Answers for "creating the data to map for the list in java 8"

0

list to map of list java 8

Map<String,Set<String>> map =  list.stream().
           collect(Collectors.groupingBy(
                    Student::getName,
                    Collectors.mapping(e->getNum(e.getAddr()), Collectors.toSet())
                ));

   System.out.println("Map : "+map);
Posted by: Guest on March-08-2021

Code answers related to "creating the data to map for the list in java 8"

Code answers related to "Java"

Java Answers by Framework

Browse Popular Code Answers by Language