0

I want to store items in multimap. For that I am using

Multimap<Integer, EmployeeClass> mapEmp = result.stream()
                        .collect(toMultimap(result::getdepartment ,result, ArrayListMultimap::create) );

This is not working. How can I use streams (in General) to add items in multimap?

R_S_C
  • 75
  • 1
  • 10
  • Does this answer your question? [Cleanest way to create a Guava Multimap from a Java 8 stream](https://stackoverflow.com/questions/23003542/cleanest-way-to-create-a-guava-multimap-from-a-java-8-stream) – Yassin Hajaj Apr 05 '21 at 15:26
  • @YassinHajaj... I'll try it out and let you know. :) – R_S_C Apr 05 '21 at 17:55

0 Answers0