File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic

Array to Hashmap

 
Seetesh Hindlekar
Ranch Hand
Posts: 244
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Hi all,
How do i create a Hashmap from an Array?
Seetesh
 
William Brogden
Author and all-around good cowpoke
Rancher
Posts: 13045
6
  • 0
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
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
 
  • Post Reply
  • Bookmark Topic Watch Topic
  • New Topic