can any one suggest me how to remove duplicate characters from a string in java and too without using string functions.

As i know we convert a given string to character array and then we can use the TreeSet to remove the duplicates. But ToCharArray is again a string function.