I am using multiple hashtables for a program viz table1 table2 table3 etc. Each table has 3 key-value pairs. the keys are same with different values. Now in the UI of my program i have a comobobox to pick the table name from user. Once it is selected i am storing it in a variable and would like to use this variable to open the appropriate table.
Thanks Eric Coolman for this piece which i have edited here for my query.
Hashtable table1 = new Hashtable();
table1 .put("COL1", Double.toString(dvalue1));
table1 .put("COL2", value2);
table1 .put("COL3", value3);
Hashtable table2 = new Hashtable();
table2 .put("COL1", Double.toString(dvalue4));
table2 .put("COL2", value5);
table2 .put("COL3", value6);
// reading that value back:
double dvalue1 = Double.parseDouble((String)table1.get("COL1"));
double value6= Double.parseDouble((String)table2.get("COL3"));`
here how can i use a variable instead of table1 and table2? what is the syntax. I am new to java.