File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
The moose likes Java in General and the fly likes Array to Hashmap Big Moose Saloon
  Search | Java FAQ | Recent Topics | Flagged Topics | Hot Topics | Zero Replies
Register / Login
JavaRanch » Java Forums » Java » Java in General
Bookmark "Array to Hashmap " Watch "Array to Hashmap " New topic
Author

Array to Hashmap

Seetesh Hindlekar
Ranch Hand

Joined: Feb 13, 2004
Posts: 244
Hi all,
How do i create a Hashmap from an Array?
Seetesh
William Brogden
Author and all-around good cowpoke
Rancher

Joined: Mar 22, 2000
Posts: 12835
    
    5
Since each entry in a HashMap requires a key and a value, there is no single call to create a HashMap from an array. Starting with a newly constructed HashMap, you have to put( key, value ) for each value in the array.
Bill
 
I agree. Here's the link: http://aspose.com/file-tools
 
subject: Array to Hashmap