Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Print key,values of Hashmap

807589Oct 28 2008 — edited Oct 28 2008
Hi,

I need to print <key,value> pair of hashmap. Can I print each <key,value> pair in a new line.
My Hashmap looks like
Map<Term,Map<Document,List<Integer>>>

If i give this statement
System.out.println(Map);

It's printing like this
university={1=[4], 2=[5]}, is={1=[2], 2=[3]}, unomaha={1=[5]

I need to print like
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on Nov 25 2008
Added on Oct 28 2008
4 comments
291 views