Results 1 to 2 of 2
- 05-04-2012, 10:11 PM #1
Member
- Join Date
- Jan 2012
- Posts
- 16
- Rep Power
- 0
-
Re: How to return a hashmap key using the value?
You don't. There is no guaranteed one-to-one correspondence between value and key (as opposed to the other way around).
This post is not clear to me at all. What exactly are you trying to do again? What code do you have?I have a hashmap - Map <String,ArrayList<Integer>>
which I wish to write a method for that scans through the ArrayList<Integer> and returns the key of a given is within the ArrayList
Similar Threads
-
Cannot return items from a hashmap
By uhertz in forum New To JavaReplies: 15Last Post: 06-20-2011, 02:06 AM -
Cannot return values from hashmap
By uhertz in forum New To JavaReplies: 1Last Post: 06-17-2011, 04:16 PM -
How to create a new HashMap from a HashMap entries of other methods
By pandeyalok in forum Advanced JavaReplies: 7Last Post: 12-08-2009, 07:17 PM -
HashMap String Return
By kizilbas1 in forum New To JavaReplies: 1Last Post: 03-10-2008, 03:34 AM -
how to return values from hashmap
By oregon in forum New To JavaReplies: 2Last Post: 08-01-2007, 04:56 PM


LinkBack URL
About LinkBacks
Reply With Quote

Bookmarks