Answer:
Attached are screenshots of the working code - baring in mind this only works on mutable Collection types. (ones that can be changed) if you use Collections that don't support this you may experience an Unsupported Operation Exception - but this is expected.
Step-by-step explanation:
Using Java streams as an alternative for some answers.