SyntaxFix
Write A Post
Hire A Developer
Questions
hashMaps can't have duplicate keys. That said, you can create a map with list values:
hashMaps
Map<Integer, List<String>>
However, using this approach will have performance implications.