database - How to create a table in Java? -
i want create sort of table in java. tried using hashmap:
public map<string, double> namesandprices = new hashmap<string, double>();
this doesn't work when want add string so:
public map<string, double, string> namesandprices = new hashmap<string, double, string>();
what class can use create sort of table in java can values , not.
use objects, rather trying put unstructured data collections.
your map should map<string, product>
, product objects containing name, price, , other properties of products.
btw, told in your previous question, , accepted answer.
Comments
Post a Comment