EDIT For lack of details, I've reset the question here . The question has been flagged and a moderator will delete it as soon as possible, thanks.
I have the following IDs and values, respectively:
1 - 18;
1 - 19;
1 - 20;
3 - 21;
3 - 22;
8 - 23;
8 -24;
8 - 25;
11 - 26;
3 - 27;
3 - 28;
How can I do that, when I pass the ID value via parameter, it returns me the values of this ID? For example, if I passed ID 3, it would return the values 21, 22, 27 & 28.
I should use map <integer, List<Integer>>
, correct? But how can I do this? How would I also add these values into my List?