Now I have to convert this list into map such that key is the department and value is empList.
In a map the key is like "hr" and value is list of emp1,emp3.
Could you please help me to solve this problem
posted 6 years ago
I have added code tags, which you should always use, to your last post, and doesn't it look better
Why are you using a linked list rather than an array list?
I think you would have to iterate your list and put a new list into the Map. It would be a bit like the counting example in the Java Tutorials. There is a new technique there, for Java8 users only.
This tiny ad will self destruct in five seconds.
Building a Better World in your Backyard by Paul Wheaton and Shawn Klassen-Koop