Home
Languages
Java
Android
C
CPP
Dot Net
Technology
GWT
Struts
Spring
DB
Database
Sql
Scripts
BatchScript
JavaScript
Bootstrap
Auto It
UI Path
Others
Ubuntu OS
Eclipse
Tomcat
Cmd Prompt
Tips
Wednesday, 30 January 2013
HashMap keys and values into ArrayList in java
HashMap hm;
// ...add hm values here...
ArrayList keys = new ArrayList(hm.keySet());
ArrayList values = new ArrayList(hm.values());
ArrayList all = new ArrayList();
all.addAll(hm.keySet());
all.addAll(hm.values());
No comments:
Post a Comment
Newer Post
Older Post
Home
Subscribe to:
Post Comments (Atom)
No comments:
Post a Comment