• Post Reply Bookmark Topic Watch Topic
  • New Topic

question regarding dynamic creation of hashmaps  RSS feed

 
subbulakshmi subha
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
how do you create a list of hashmaps?suppose the user enters n,how do we create a list of n hashmasp?
 
Tushar Goel
Ranch Hand
Posts: 934
4
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Why you want to do this?

 
subbulakshmi subha
Greenhorn
Posts: 2
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
Because I want to store data randomly in those hashmaps ,depending on the number of hashmaps the user specifies.I'm trying to simulate i/o reads and write ,the no of hashmaps corresponds to the no of nodes
 
Paul Clapham
Sheriff
Posts: 22841
43
Eclipse IDE Firefox Browser MySQL Database
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
What does "n" mean when the user enters it? Does that mean you want to have n Hashmaps? If so then why not just have an array of Hashmaps? (Don't forget to initialize each array entry with an empty Hashmap.)
 
Campbell Ritchie
Marshal
Posts: 56592
172
  • Mark post as helpful
  • send pies
  • Quote
  • Report post to moderator
And welcome to the Ranch
 
  • Post Reply Bookmark Topic Watch Topic
  • New Topic
Boost this thread!