My tree Map is
Map<String, Double> restrMap = new TreeMap<String, Double>();
While adding the below two value to the treeMap, it only shows one. The second value, when comes updates the first one.
6, 8.00 6, 5.00
How can I add two values for the same key, perhaps in different rows?
If you are adding multiple values to the same key, consider having a Map of Lists.
Map<String, List<Double>> restrMap = new TreeMap<String, List<Double>>();
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With