GeekInterview.com
Series: Subject: Topic:
Question: 19 of 995

Convert List Object to Map Object

How to convert list object in to map object?
Asked by: pragya03 | Member Since Sep-2010 | Asked on: Sep 29th, 2010

View all questions by pragya03

Showing Answers 1 - 1 of 1 Answers
sree

Answered On : Nov 6th, 2012


List list;
Map map = new HashMap();
for (Item i : list) map.put(i.getKey(),i);

  
Login to rate this answer.

Give your answer:

If you think the above answer is not correct, Please select a reason and add your answer below.

Related Open Questions

Ads

Connect

twitter fb Linkedin GPlus RSS

Ads

Interview Question

 Ask Interview Question?

 

Latest Questions

Interview & Career Tips

Get invaluable Interview and Career Tips delivered directly to your inbox. Get your news alert set up today, Once you confirm your Email subscription, you will be able to download Job Inteview Questions Ebook . Please contact me if you there is any issue with the download.