Hello,
Well all the questions I have been asking regarding TreeSet, I have wasted your valuable time. I am really sorry because I believe I mis-understood the question. It doesn't help when you got no one to talk to about this assignment. The real question was related to anagram assignment. In the first question it ask "To the Anagram class add a new public instance method called LetterSet() that takes a string as an argument and returns the characters in the argument as a set. I believe I have done right. But tell me if I am wrong? Then it asks to create empty instance in the constructor which I have done. So far it has not asked to add any letters to the Table. The reason I have used statics in my previous questions because all the examples I have given were based on public static void methodname. Feel free wipe of all the points I have gained, I don't deserve it. Here is what I have done...
public class Anagram
{
private static Set<String> Table = new TreeSet<String>();
public Anagram()
{
super();
this.Table = new TreeSet<String>();
}
public Set<String> LetterSet(String phrase)
{
return anagramTable;
}
}