How can I convert this:
Map<String, Integer> itemsBought
So, I can add it to an ArrayList, as shown below:
public void add(String prd, int qty){
orderList.add(new Order(prd, qty));
}
Are there other solutions:
hashMap.keySet().toArray();
hashMap.values().toArray();
Thanks in advance.
source
share