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 iterate map in collection framework?

Answer Posted / navin kumar

Map<String,String> map = new HashMap<String,String>();
map.put("A","Rohan");
map.put("C","Sohan");
map.put("B","Ram");

for(String key : map.entrySet()){
sop(key);//A,C and B as key
sop(map.get(key))//Rohan,Sohan and Ram as values
}

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is sid for to trasport the object along the land scape:/

1962


How would record time in your sap hr system?

1022


How do I view my wordpress database?

203


What is autonomous robot?

1021


What happens if you add your just created object to a mutable array, and you release your object?

1


explain advantages of myisam over innodb? : Sql dba

1111


Explain the application of AI in automated grading systems.

93


what is the difference between a thread and a computer process?

452


Have You Worked Earlier? If yes then why did you leave that Company?

1160


What does || mean in programming?

1060


Where do you find standard reports in hr?

986


How do I remove a page border in word?

659


What is peering in aws?

173


What are disadvantages of REST web services?

723


What can windows server do?

373