I am actually , looking whether exist any structure or interface in java
1 -> A
1 -> B
2 -> A
2 -> B
2 -> C
which store the details as
1 -> {A,B} and 2 -> {A,B,C}
Like , if I use map , it might be return as
1 -> B and 2 -> C
I am looking for something that can return as
1 -> {A,B} and 2 -> {A,B,C}
Thanks !
Map<Integer, Character[]>or aMap<Integer, List<Character>>or use String instead of Character, depending on your real use case.1and2as examples for actually going to be consecutive integers?