gudii9
asked on
Hashmap inside a Arraylist
hI,
I have a hashmap which has username and password information.
Map mapDetail = new HashMap();
mapDetail.put("username",u sername);
mapDetail.put("password",p assword);
HashMap is embedded in a arraylist like below
List missingList = new ArrayList();
missingList.add(mapDetail) ;
I need to read the username and password information to send it to one other java program. How can I achieve it.Any ideas, suggestions, sample code, links, source code highly appreciated. Thanks in advance
I have a hashmap which has username and password information.
Map mapDetail = new HashMap();
mapDetail.put("username",u
mapDetail.put("password",p
HashMap is embedded in a arraylist like below
List missingList = new ArrayList();
missingList.add(mapDetail)
I need to read the username and password information to send it to one other java program. How can I achieve it.Any ideas, suggestions, sample code, links, source code highly appreciated. Thanks in advance
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
My example should be more generic really:
for (Map<String, String> m : maps) {
for (Map.Entry<String, String> e : m.entrySet()) {
String key = e.getKey();
String val = e.getValue();
System.out.printf("key=%s,value=%s\n", key, val);
}
}
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Thanx 4 axxepting
ASKER