Here is what i'm working with:
Code:
public class Menu1DB
{
public static Hashtable loadMenu()
{
int i = 0;
String line;
Hashtable hshProdDesc = new Hashtable();
Hashtable hshProdPrice = new Hashtable();
StringTokenizer strings;
try
{
BufferedReader file =
new BufferedReader(new FileReader("menu.txt"));
// priming read
line = file.readLine();
//while ((line = file.readLine()) != null)
while (line != null)
{
strings = new StringTokenizer(line, ",");
String strProdID = strings.nextToken();
String strProdDesc = strings.nextToken();
String strProdPrice = strings.nextToken();
double dblProdPrice = Double.valueOf(strProdPrice).doubleValue();
hshProdDesc.put(strProdID,strProdDesc);
//-->> hshProdPrice.put(strProdID,dblProdPrice);
Apparently '.put' only allows (Object, Object) so i'm stuck. I need to do (Object, double).
Thanks!
-BD