aspose file tools*
The moose likes Beginning Java and the fly likes doubt on HashMap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of Java 8 in Action this week in the Java 8 forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "doubt on HashMap" Watch "doubt on HashMap" New topic
Author

doubt on HashMap

Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Hi All,

i have 2 questions

1) what is the difference between ArrayList and LinkedList

2) how to get the key value from HashMap

please can any one tell me the solution...

Thanks & Regards,
seetharaman.v
Katrina Owen
Sheriff

Joined: Nov 03, 2006
Posts: 1347
    
  13
Hi there,

For LinkedList vs ArrayList, could you be more specific? Are you asking about performance differences between the two data structures?

For the HashMap, I'd suggest that you take a look at the API, try to apply what you find there in an example, and if you get stuck, show us what you've got, and we'll help you figure out what went wrong.
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Hi Katrina,

well, i looked the api... my question is how you will get the keys from hashmap..

second thing) what is the performance (datastructure) difference between ArrayList and LinkedList
marc weber
Sheriff

Joined: Aug 31, 2004
Posts: 11343

Originally posted by seetharaman venkatasamy:
...well, i looked the api... my question is how you will get the keys from hashmap...

Didn't you see the method keySet()?

For differences among Lists, see Choosing between Lists from Eckel's Thinking in Java.


"We're kind of on the level of crossword puzzle writers... And no one ever goes to them and gives them an award." ~Joe Strummer
sscce.org
Seetharaman Venkatasamy
Ranch Hand

Joined: Jan 28, 2008
Posts: 5575

Thanks a lot katrina and marc
 
 
subject: doubt on HashMap
 
Similar Threads
Hashtable
switch on String
HOW TO CREATE HASH MAP USING ARRAYLIST??
Array of Hashmaps
WA #1.....word association