A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
The Mikado Method
this week in the
Agile and other Processes
Converting Hash map to linked list
Joined: Nov 16, 2006
Sep 21, 2007 22:25:00
Is there any way of converting from hash map to linked list.please tell me.
thanks in advance.
Joined: Oct 27, 2005
Sep 22, 2007 03:31:00
First of all, you're posting in the wrong forum. This has nothing to do with Swing, AWT etc.
Second of all, what do you want to put in the linked list? The keys or the values?
Anyway, here's some code that should do it for you:
Map<String,Integer> map; List<String> keys = new LinkedList<String>(map.keySet()); List<Integer> values = new LinkedList<Integer>(map.values());
SCJP 1.4 - SCJP 6 - SCWCD 5
How To Ask Questions
How To Answer Questions
I agree. Here's the link:
- if it wasn't for jprofiler, we would need to run our stuff on 16 servers instead of 3.
subject: Converting Hash map to linked list
HashMap and LinkedHashMap
K&B Java 5 scjp ch7 page 24/114
Storing ActionForm&action class-WHERE?
Html atribute grabber
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2013