I have a problem, I'm sure the solution is so simple, but I can not find it. I have ArrayListsmaller ArrayLists. These lists contain type elements String. I want to merge smaller lists into one and then remove duplicates. Let me be clear.
I have it:
[[USA, Maine], [USA, Maine, Kennebunk], [USA, Maine, North Berwick],
[USA, New Hampshire], [USA, Keene, New Hampshire], [USA, Keene, New
Hampshire, Main Street], [USA, New Hampshire, Swanzey]].
This is my main list with smaller lists inside. I want to have the final one ArrayList, which is a merger of smaller ones and removes duplicates.
I want:
[USA, Maine, Kennebunk, North Berwick, New Hampshire , Keene, Main Street, Swanzey]
Any help is appreciated. thank you