File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
A friendly place for programming greenhorns!
Big Moose Saloon
Register / Login
Win a copy of
Murach's Java Servlets and JSP
this week in the
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 - OCEEJBD 6
How To Ask Questions
How To Answer Questions
Did you see how Paul
cut 87% off of his electric heat bill with 82 watts of micro heaters
subject: Converting Hash map to linked list
K&B Java 5 scjp ch7 page 24/114
Storing ActionForm&action class-WHERE?
Html atribute grabber
HashMap and LinkedHashMap
All times are in JavaRanch time: GMT-6 in summer, GMT-7 in winter
| Powered by
Copyright © 1998-2014