Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

How to extract HashMap values?

Answer Posted / siddpany

class hashMap
{
public static void main(String args[])
{
HashMap map = new HashMap();
map.put("key1",200);
map.put("key1",100);
map.put("key1",400);
map.put("key1",700);
Set set = map.keySet();
//for each loop
for(Object object :set)
{
System.out.println(map.get(Object));
}

Is This Answer Correct ?    11 Yes 4 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is string builder?

946


Does windows 10 need java?

1099


Which containers use a flowlayout as their default layout in java programming?

1057


What are wrapped classes in java programming?

1099


What are the types of strings?

1087


What is difference between pointer and reference?

1115


What are synchronized methods ?

1154


What is javac in java?

1054


What is stack class in java?

1094


Why local variables are stored in stack?

1037


Define a package.

1168


How will you initialize an Applet?

1198


What is identifier give example?

1097


What are the types of web technologies?

1081


Using callable statement how can you pass out parameters, explain with example?

1276