Created
October 26, 2009 23:12
-
-
Save padolsey/219135 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
public void insert(String newWord) { | |
dictionary.add(newWord); | |
Collections.sort(dictionary, new Comparator<String>(){ | |
public int compare(String s1, String s2) { | |
return s1.compareToIgnoreCase(s2); | |
} | |
}); | |
dictReader.save(dictionary); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment