Practice · 1 of 3
Stock ledger
CHALLENGE
Difficulty: beginner+25 XP
Implement static int totalQuantity(java.util.List<Integer> quantities) (sum of a List — generics in action) and static java.util.Map<String, Integer> mergeStock(java.util.Map<String, Integer> a, java.util.Map<String, Integer> b) returning a NEW map with quantities summed per key.
Press Submit to check your solution.
Back to lesson: Practice: Practice: Collections at Work