I need your help, cause I don't know how to solve it.
This list is in a arraylist<runners> runners and the entity is the same as the topic.
runner, style, date, distance
Micky Maus, free-style, 2019-06-05, 4654
Goofy, speedrun, 2019-01-02, 5798
Donald Duck, cross, 2019-08-15, 4581
Micky Maus, cross, 2019-04-05, 8709
Donald Duck, normal, 2019-08-15, 4711
Micky Maus, walking, 2019-07-06, 4541
What I need the total sum of the distance for each runner (style and date can be ignore).
My first idea was to create a map like this one:
My expectation is a list with:
Micky Maus, 17904
Donald Duck, 9292
for any help I'am appreciative, Thanks