Featured Post

Merging Two HashMaps in java

Hi Guys ,

Have ever come across the question called Merging Two HashMaps into single HashMap . You might have come across that question but I stringly feel you will write simple program and defining some varibales solve the logic . But what do you feel that would be perormance issue isn't it . If I give you 5 hashmaps and converting them into single hashmap then again you will think of writing some custom logic which gives required output . But following flaws would be there in your program logic which I am mentioned below .

**************************************************

1)There may be duplicate entries in you may be pickingup the things and merging into single hashmap
2)Lot of varibles required eventually leads to Bad program logic which may causes the OutOfMemory
3)If there are more hashmaps then program logic need to be changed .

Hence We need to Use org.apache.faces.HashMapUtils one class is there you can use that class to to merge the HashMaps into single HashMap . Okay nOw this is the time to understand the teaser . please have look at below question which is really a good teaser

As you know HashMap allows one null key many null values . lets assume to retieve the keys from HahMap we may endup with the null keys which will be returning of type Set. But As you know Set will not hold the null values what will you do ...? in this scenario . Please do let me know the reply to this question ... you could reach me at srampv@gmail.com

Copy rights reserved By Venkat ....!





Enter you DOB ,Time and Place

SEO Schemes

Comments

Popular posts from this blog

[Inside AdSense] Understanding your eCPM (effective cost per thousand impress...