jQuery in Action, 2nd edition*
The moose likes Beginning Java and the fly likes Retrieve Value with out key in hashmap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login


Win a copy of The Java EE 7 Tutorial Volume 1 or Volume 2 this week in the Java EE forum
or jQuery UI in Action in the JavaScript forum!
JavaRanch » Java Forums » Java » Beginning Java
Bookmark "Retrieve Value with out key in hashmap" Watch "Retrieve Value with out key in hashmap" New topic
Author

Retrieve Value with out key in hashmap

Rajendra Prakash
Ranch Hand

Joined: Sep 10, 2009
Posts: 293
How can you retrieve values in hashmap with knowing key . Is there any possibllit to get from another class
Christophe Verré
Sheriff

Joined: Nov 24, 2005
Posts: 14687
    
  16

What do you want to do exactly ? Retrieve all values in the Map ? Did you check the API ?


[My Blog]
All roads lead to JavaRanch
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38436
    
  23
Have you read the methods of the Map interface? I think one of those will provide what you want.
Rajendra Prakash
Ranch Hand

Joined: Sep 10, 2009
Posts: 293
my interviewer asked. how can you retrieve values from hashmap consider keys are not known to you.He asked
me can you get key from another class.
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38436
    
  23
. . . and what did you say?
Rajendra Prakash
Ranch Hand

Joined: Sep 10, 2009
Posts: 293
Is there any possibility to retrieve hashmap values from another class . This is possible or not
Ulf Dittmer
Marshal

Joined: Mar 22, 2005
Posts: 41587
    
  54
Campbell Ritchie wrote:Have you read the methods of the Map interface? I think one of those will provide what you want.

I think so, too :-)


Ping & DNS - my free Android networking tools app
Campbell Ritchie
Sheriff

Joined: Oct 13, 2005
Posts: 38436
    
  23
Don't understand your reply; you appear simply to be repeating what you said earlier.
Rob Spoor
Sheriff

Joined: Oct 27, 2005
Posts: 19672
    
  18

So let's reply the answer as well.
Campbell Ritchie wrote:Have you read the methods of the Map interface? I think one of those will provide what you want.


SCJP 1.4 - SCJP 6 - SCWCD 5 - OCEEJBD 6
How To Ask Questions How To Answer Questions
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Retrieve Value with out key in hashmap