I have to store values into a list/map which contains three values:
size | amount | description
2,34 | 4 | "I'm a long String"
1,14 | 2 | "I'm another long String"
So I thought about using a nested Map like :
Map<Double, Map<Integer,String>> a = new HashMap<Double, Map<Integer,String>>();
But how can I easy add entries to that Map? Syntax like
a.put(1,43, new Map.Entry<>(7,"9890"));
didn't work, cause Map
is abstract. What is the best way to get my nested Map?