I have a
private Map<String,List<ProductScheme>> discountMap = new HashMap<String,List<ProductScheme>>();
now if i get list from discountMap and add an item in list
will i have to put the list again in discount map or it will not be required ??
You only need to add a List if it wasn’t there before. A pattern I use is