Skip to content

Instantly share code, notes, and snippets.

@padolsey
Created October 26, 2009 23:12
Show Gist options
  • Save padolsey/219135 to your computer and use it in GitHub Desktop.
Save padolsey/219135 to your computer and use it in GitHub Desktop.
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