As the title says is there a simple way to change the key of my hashmap?
Here I update all the values of my hashmap
stock.put(itemCode.getText(), new StockData.Item(itemName.getText(),(Double) priceS.getValue(), (Integer)quantityS.getValue(), file.getName())); and now I would like to change the key, I used earlier removing and inserting data that worked but the order was changed which I don't want to happen.
HashMaphas no order. What do you mean by "the order was changed"?