File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
The moose likes Beginning Java and the fly likes Collection Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login

Win a copy of REST with Spring (video course) this week in the Spring forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Collection" Watch "Collection" New topic


Sandy Lal

Joined: Jan 12, 2007
Posts: 2
I want to write a program with Using HashMap and ArrayList,How i can do that or write a code for that.
Q.A java class having a Map of with values as List. Print each Key in the Map and the values in the list.
Paul Sturrock

Joined: Apr 14, 2004
Posts: 10336

Have you looked at the JavaDocs for Map? In particular, have you noticed the values() and keySet() methods?

JavaRanch FAQ HowToAskQuestionsOnJavaRanch
Henry Wong

Joined: Sep 28, 2004
Posts: 20370

Furthermore, commonly used core classes, like the collection classes, are hardly considered "other java apis"... Moving this topic to the Java in General, Beginner forum.


Books: Java Threads, 3rd Edition, Jini in a Nutshell, and Java Gems (contributor)
subject: Collection
It's not a secret anymore!