Skip to Main Content

Java Programming

Announcement

For appeals, questions and feedback about Oracle Forums, please email oracle-forums-moderators_us@oracle.com. Technical questions should be asked in the appropriate category. Thank you!

Random value out of a HashMap

611651Apr 21 2007 — edited Apr 22 2007
Hi, I'm trying to make a translation program (for testing purposes)

I've put the words and their explanation in a HashMap like
key value
Run --- loop(wich is the translation in dutch)

I'm not sure if this is the right collection i need for it.
Another way i know is to create 2 arrays and do it that way...
But now I want to show a random key out of that Map or just loop trough them,how can that be done.

Can a moderator replace my message to the java newbies section :p I didn't saw it until now.

Message was edited by:
stef569

Message was edited by:
stef569

null

Message was edited by:
stef569

Message was edited by:
stef569
Comments
Locked Post
New comments cannot be posted to this locked post.
Post Details
Locked on May 20 2007
Added on Apr 21 2007
7 comments
422 views