File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
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 EJB 3 in Action this week in the EJB and other Java EE Technologies 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: 36478
    
  16
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: 36478
    
  16
. . . 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: 39547
    
  27
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 - updated with new look and Ping home screen widget
Campbell Ritchie
Sheriff

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

Joined: Oct 27, 2005
Posts: 19541
    
  16

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
 
Similar Threads
Without Key can we retrieve particular value in hashmap
Java Hashmap Sorting
fast list/map??
LDAP
hashmap key values