Computing.Net > Forums > Programming > JAVA help, urgent plz

Computer Problems? Computing.Net has over 1,000,000 posts about all things technology related! Over 90% answered within 24 hours! Click here to start participating now! Also, be sure to check out the New User Guide.

JAVA help, urgent plz

Reply to Message Icon

Name: hillank
Date: April 13, 2004 at 20:45:12 Pacific
OS: WinXP
CPU/Ram: 512
Comment:

Hi there,

I am trying to iterator through a hashmap, and it doesnt seem to be working.. i am a newbie at hashmaps, so any help would be appreciated! :)

below is the code i am using to iterate through the hashmap to search for a key word.
Object key = "test"
dBase db;
Set keys = dbaseMap.keySet();
Iterator iter = keys.iterator();
while(iter.hasNext())
{
key = iter.next();
db = (dBase)dbaseMap.get(key);
System.out.println(db.getSymbol());
}

if anyone can help it would be greatly appreciated. Thanks

Hillan.



Sponsored Link
Ads by Google

Response Number 1
Name: gpp
Date: April 14, 2004 at 05:43:10 Pacific
Reply:

Did you try using the containsKey() method?


0
Reply to Message Icon

Related Posts

See More







Post Locked

This post is quite old and has been locked from receiving new replies. Please create a new posting instead.


Go to Programming Forum Home


Sponsored links

Ads by Google


Results for: JAVA help, urgent plz

JAVA help, urgent plz www.computing.net/answers/programming/java-help-urgent-plz/9997.html

Java Help - urgent www.computing.net/answers/programming/java-help-urgent/10223.html

Need your help urgently. (LsaLogonUser) www.computing.net/answers/programming/need-your-help-urgently-lsalogonuser/2516.html