Can someone tell me how to properly define an array of hashtables in java? The purpose that I need this for is I have 6 nodes, and each node can have a number of links where a link consists of a linkid(int) and value(int). If anyone has any suggestions, I would appreciate it. Each node can have multiple links.
I have been using an arraylist of hashtables before but when compiled it, a warning appears that my java file uses unchecked or unsafe operations, to recompile with -Xlint. When I recompiled the program, it appears that Java does not like an arraylist of hashtables...
My code was like this:
ArrayList<Hashtable<Integer,Integer>> DB_entry;
DB_entry = new ArrayList<Hashtable<Integer,Integer>>();
for (int i = 0; i < 6; i++)
{
Hashtable temp = new Hashtable();
DB_entry.add(temp);
}