I have the list of projects(String) and respective users which I am taking from users as an input :
Project1,User1 Project1,User2 Project1,User3 Project2,User4 Project2,User5
I would like to have this data in the format like:
Project1: User1,User2,User3 Project2:User4,User5
I am trying the same thing to put in hashmap
HashMap<String, HashSet> hsp = new HashMap<String, HashSet>();
HashSet<String> userHash = new HashSet<String>();
Can any one help me to understand how to do it? I am accepting both project name and user name from user.