so your deleteRepeats method takes a
string.
It declares an array large enough to hold every element.
you then loop through every
character in the string. And commas are characters.
You check to see if the current character is in the array, and if not, you add it in. So the first time you see a comma character, it gets added into your table array.
when you are done you return the contents of the array as a string, which will only have one comma in it.
when the string is passes in to your method,
java doesn't know that you have elements separated by commas...it just sees a single string with 8 (or whatever) characters, and it is therefor finding the unique characters.
So you need to somehow separate the DATA (a b c) from the SEPARATORS (the commas).