Menu
Menu
DaniWeb
Log In
Sign Up
Read
Contribute
Meet
Search
Search
About 1,000 results for
hashmap
- Page 1
Re: hashmap
Programming
Software Development
16 Years Ago
by javaAddict
…/1.5.0/docs/api/java/util/
HashMap
.html"]
HashMap
[/URL] [CODE]
HashMap
map = new
HashMap
(); map.put("ONE",new Integer…;ONE"); int value = integ.intValue(); [/CODE] or [CODE]
HashMap
map = new
HashMap
<String,Integer>(); map.put("ONE"…
Re: hashmap
Programming
Software Development
16 Years Ago
by codered152
… like this private Map<Object, String> map= new
HashMap
<Object, String>(); and i need to create new… variable and use that to keep track of the that
hashmap
. so if u guys just explain me some more. thanks… do something like this. int intVariable = map; so all the
hashmap
value store in intVariable.
hashmap
Programming
Software Development
16 Years Ago
by codered152
hi guys i have quiestion. i m using
hashmap
and now what i have to use
hashmap
value and put that in the int variable, can u guys help with that. i just need some hints so i can work on that. thank you
Re: hashmap
Programming
Software Development
16 Years Ago
by codered152
thank you for replies so soon. its making more sense for me now, but still there is some confusion, what i have is like this private Map<Object, String> map= new
HashMap
<Object, String>(); and i need to create new int variable and use that to keep track of the that
hashmap
. so if u guys just explain me some more. thanks you.
Re: hashmap
Programming
Software Development
16 Years Ago
by new_2_java
Here's what you can do: [code=java]
HashMap
map = new
HashMap
(); map.put(new Integer(1), new String("ONE")); map.put(new Integer(2), new String("TWO")); map.put(new Integer(3), new String("THREE")); int one = Integer.parseInt(map.get(new Integer(1)).toString()); and so on... [/code]
Re: hashmap
Programming
Software Development
16 Years Ago
by javaAddict
…;ONE")[/ICODE] I think you should try: [CODE]
HashMap
map = new
HashMap
(); map.put(new String("ONE"), new Integer…
Re: hashmap
Programming
Software Development
16 Years Ago
by Ezzaral
I think you may have meant[code] Map<String, Integer> map = new
HashMap
<String, Integer>(); map.put("ONE", 1); int value = map.get("ONE");[/code] Missing type on declaration and redundant cast on map.get(). ;)
Hashmap
Programming
Software Development
12 Years Ago
by engrjd91
Can we use integer as a key for the string in the
HASHMAP
?
HashMap re-set question.
Programming
Software Development
16 Years Ago
by new_2_java
… pair. The program processes each element of the
hashMap
, and should mark the
HashMap
element as "processed". i.e. I… the key to (-1) after processing the elements in the
HashMap
? Please advise... Thanks,
Re: HashMap re-set question.
Programming
Software Development
16 Years Ago
by new_2_java
… for prompt reply, I have ran a sample test and
HashMap
.put(..) does what I was looking for. Basically, this is… threads, say 10. and each thread will operate on that
HashMap
list. So, soon as a thread chooses an element of… the
HashMap
to operate on, it should mark the
HashMap
element as "Processed" so…
Re: HashMap re-set question.
Programming
Software Development
16 Years Ago
by new_2_java
…[code=java] public class MigrationUtility { private
HashMap
map = new
HashMap
(); public static void main(String[] args){ …i)); } } } class MigrationUtilityThread extends Thread{ private
HashMap
m = null; MigrationUtilityThread(
HashMap
map){ m = map; } public void run(){…
Re: HashMap re-set question.
Programming
Software Development
16 Years Ago
by new_2_java
… void main(String[] arg) { myClass m = new myClass ();
HashMap
map = m.loadHashMap (); // this will only load the…
HashMap
wil key/value as mentioned above for (int i…will each thread operate exactly on on element of the
Hashmap
, which is not marked yet as "Processed"…
Re: Hashmap, ArrayList and Comparator
Programming
Software Development
14 Years Ago
by NewOrder
…= 0; String booksName = null; String stop;
HashMap
<String, Object> dic=new
HashMap
<String, Object>(); Student book=new… to do is to search the input (studentName)..in the
hashmap
, which contains objects System.out.println(dic.get(book)); } } } } …
Re: HashMap re-set question.
Programming
Software Development
16 Years Ago
by new_2_java
In second thaught, now I think, you are right. I would like to update the value and NOT the [I]KEY[/I] so the value of my
HashMap
would look like: [code] 1/"Processed" 2/"Processed" 3/"Processed" and so on... [/code] Thanks
HashMap values in JSP????urgent pls help
Programming
Web Development
14 Years Ago
by kkjava
Hi All, Iam really stuck with this issue.... I have
HashMap
values like these below [0.76,.0818] from DB i …;TD> in jsp. this is what am trying....... setting
HashMap
values in arraylist in DAO class and iterating that arraylist…
HashMap Collection - obtaining class object functions
Programming
Software Development
13 Years Ago
by iXmerof
… reads values from those strings. Next I've made a
hashmap
, keys are generated as strings made by merging values from….... } ... class showAll { Set entries = data.entrySet(); //where data is actual
hashmap
Iterator it = entries.iterator(); while(it.hasNext()) { Map.Entry entry…
Re: Hashmap, ArrayList and Comparator
Programming
Software Development
14 Years Ago
by NewOrder
…); i think i need to change [CODE]
HashMap
<String, Object> dic=new
HashMap
<String, Object>();[/CODE] i think…
Re: HashMap values in JSP????urgent pls help
Programming
Web Development
14 Years Ago
by peter_budo
What method you using to t data out of
HashMap
? Are you getting [0.76,.0818] as two values where first is key and second value or their are single entry as string?
HashMap, Iterating problem
Programming
Software Development
18 Years Ago
by fdrage
Hi guys, I have a
HashMap
, and it stored a bunch of Strings... the key is a String and the value is a Set of String... and it looks something like this [QUOTE]{ D=[E,C], C=[B], E=[B], B=[A] } [/QUOTE] what is the best way to iterate through this map so i get two list. i.e. [B]D-E-B-A [/B] and the other would be [B] D-C-B-A[/B]
Re: HashMap, Iterating problem
Programming
Software Development
18 Years Ago
by iamthwee
[QUOTE=fdrage;258960]Hi guys, I have a
HashMap
, and it stored a bunch of Strings... the key is a String and the value is a Set of String... and it looks something like this what is the best way to iterate through this map so i get two list. i.e. [B]D-E-B-A [/B] and the other would be [B] D-C-B-A[/B][/QUOTE] I don't get it.
HashMap storing duplicate Keys
Programming
Software Development
15 Years Ago
by white feather
[CODE] private Map<String , String> c = new
HashMap
<String , String>(); .... //regx to get mString c.put(…
Hashmap, ArrayList and Comparator
Programming
Software Development
14 Years Ago
by NewOrder
… about how to apply those to my code. first the
Hashmap
, i used the code it and i entered information inside…
Re: Hashmap, ArrayList and Comparator
Programming
Software Development
14 Years Ago
by NewOrder
… name in a particular object type that is inside the
hashmap
. so i thought to use containskey, but it wont do…
Re: Hashmap, ArrayList and Comparator
Programming
Software Development
14 Years Ago
by JamesCherrill
…'s name? If so, this is the key in the
HashMap
, so you can use containsKey. The problem with lines 47…
Hashmap removal
Programming
Software Development
11 Years Ago
by kay19
Hello. Just learned about
hashmap
a week ago. My code can add an Employee's …
hashmap explanation
Programming
Software Development
11 Years Ago
by inspire_all
Please can anybody explain me the following things below:: 1.What is a
hashmap
2.Its use 3.What do we do to avoid collisions....
Re: hashmap explanation
Programming
Software Development
11 Years Ago
by deceptikon
… you directly to [here](http://eternallyconfuzzled.com/jsw_home.aspx). A
hashmap
by definition is almost surely implemented using a [hash table…
Re: HashMap
Programming
Software Development
13 Years Ago
by coolsport04
… should still be scrambled (ex. addej, ahicryrhe, alvan,). In the
hashmap
these words should be in the left column as keys… should be the values in the right column of the
hashmap
. [QUOTE=JamesCherrill;1705817]So is this what you mean? 1… as key and the real word as value to a
hashmap
. 4. Read a file or stream of user-entered jumbled…
Re: HashMap
Programming
Software Development
13 Years Ago
by coolsport04
…, and baltoc. And I want the program to use a
hashmap
to unscramble the words to jaded, hierarchy, naval, banana, cobalt… really depend on what you're trying to do. A
hashmap
will be beneficial when you already know what things belong…
Re: HashMap
Programming
Software Development
13 Years Ago
by JamesCherrill
… as key and the real word as value to a
hashmap
. 4. Read a file or stream of user-entered jumbled… word as key to retrieve the real word from the
hashmap
1
2
3
17
Next
Last
Search
Search
Forums
Forum Index
Hardware/Software
Recommended Topics
Programming
Recommended Topics
Digital Media
Recommended Topics
Community Center
Recommended Topics
Latest Content
Newest Topics
Latest Topics
Latest Posts
Latest Comments
Top Tags
Topics Feed
Social
Top Members
Meet People
Community Functions
DaniWeb Premium
Newsletter Archive
Markdown Syntax
Community Rules
Developer APIs
Connect API
Forum API Docs
Tools
SEO Backlink Checker
Legal
Terms of Service
Privacy Policy
FAQ
About Us
Advertise
Contact Us
© 2025 DaniWeb® LLC