Try using trim on the Strings before you add them to the sets.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
to be found in the API docs.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
Uhm, no. He's using Strings and they are already comparable.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
Between reading the String and adding it to set, of course. Do you need someone to hold your hand when using the bathroom?
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494
trim returns a String (as the API docs state), so where are you storing that String? Strings are immutable (which you should already know) which means you cannot change their contents. You can only create new Strings.
masijade
Industrious Poster
4,253 posts since Feb 2006
Reputation Points: 1,471
Solved Threads: 494