I have 15 hashmaps that I am filling and placing in an array. The names of the hash maps increase numerically as follows.
hBasicCov1
hBasicCov2
hBasicCov3
hBasicCov4 and so on......
I want to process this in a loop and when I to fill each hashmap, I want to fill the next available hashmap and increment the name by one. I thought maybe I could do this by concatenating a string with an integer and incrementing the integer, abd then use this string somehow as my hashmap name, but this doesn't work...
String hBC = "hbasicCov";
String basCovHM = "";
basCovHM = hBC + num1; increment num1 each time thru loop
In other words I want to increment the name of a hashmap and then use the put method on that name. Is this possible in java?
Any ideas?
Thanks.....
hBasicCov1
hBasicCov2
hBasicCov3
hBasicCov4 and so on......
I want to process this in a loop and when I to fill each hashmap, I want to fill the next available hashmap and increment the name by one. I thought maybe I could do this by concatenating a string with an integer and incrementing the integer, abd then use this string somehow as my hashmap name, but this doesn't work...
String hBC = "hbasicCov";
String basCovHM = "";
basCovHM = hBC + num1; increment num1 each time thru loop
In other words I want to increment the name of a hashmap and then use the put method on that name. Is this possible in java?
Any ideas?
Thanks.....