I want to generate a new name of each new array that are created.
I have a SellAbleItem class, with a constructor, which takes the following:
SellAbleItems Vodka = new Brunch("Brunch", 199);
SellAbleItems Brunch = new Brunch("Vodka", 99);
I have this array list
ArrayList<SellAbleItems> order = new ArrayList<SellAbleItems>();
And I put these inside my order array list
order.add(Vodka);
order.add(Brunch);
So, my question goes on how to generate at new name for the order array list? I would like to have orders, to be called like order1, order2, order3 and so on. And at the end, able to print these names.
>`, or a `Map>`. The advantage of the map is, that you can actually choose a name (which has to be unique)
– XtremeBaumer Mar 27 '18 at 08:53