Tuesday, July 15, 2008

HashMap loop in java

This is how you loop through the Key Value pairs in a Hashmap

Iterator iter = values.keySet().iterator();

while (iter.hasNext()) {
String key = iter.next();
String value = values.get(key);
System.out.println("Key ="+key+"\n Value"+value)
}

Here, I have implicitly assumed that values is a HashMap but as you know it can be of any Object that you like. I just used it for string and felt it might be a good example if someone is looking for it

8 comments:

123 123 said...

Great article you got here. I'd like to read something more about this topic.
By the way look at the design I've made myself High class escorts

天兵 said...

cool blog,期待更新.........................

オテモヤン said...

オナニー
逆援助
SEX
フェラチオ
ソープ
逆援助
出張ホスト
手コキ
おっぱい
フェラチオ
中出し
セックス
デリヘル
包茎
逆援
性欲

adsv15sd said...

Better late than never.
..................................................

草莓花園 said...

幸福是人人都要,又怎麼可能都歸你所有?要知道這世界幸福本來就不多........................................

香蕉哥哥 said...

adult成人情色激情成人聊天網情色影片色情俱樂部性愛影片情趣淫水影音情色限制級照片live show女生自慰影片超屌成人情色留言板淫亂女自慰免費視訊辣妹巨乳鹹濕色情影音聊天自拍走光照片免費情色av圖片亞洲情色論壇淫慾免費裸女圖片裙底風光台灣色情論壇一夜正妹淫娃網情色下載a圖片全裸淫蕩女人情色影音聊天高潮自慰色情圖片成人自拍女生自慰亞洲成人色情dvd舔乳頭女生自慰影片台灣色情網站台灣性樂園sex story情色影音激情聊天室嘿咻情色自拍

purchase viagra said...

viagra prescription
purchase viagra online

Asia Explore Adventure & Travel said...

Asia Explore Adventure & Travel is founded by the dedicated explorers and professional Team to operate the luxurious holiday tour and explore the incredible attractions to the various country of Nepal, Bhutan, Tibet and India.We are operating, classic tours, cultural &historical tours, leisure holiday tours,MICE,training& conference tours, Mercedes Benz terrain coach tours, outdoor adventure tours (trekking, hiking, outdoor camping, jungle safari, white water rafting, paragliding etc.), air/helicopter charters, special custom made itinerary tours for outbound travel agencies and provide “one time shop” services to our customers.
Trekking in Nepal
Annapurna Base Camp Trek
Everest Base Camp Trek
Langtang Valley Trek
Mount Kailash Tours
Kanchenjunga Trek