words.add(word); };
Integer lenght = new Integer(word.length()); if(sortedWords.containsKey(lenght)){ ArrayList thisLenghtwords = (ArrayList)sortedWords.get(lenght); thisLenghtwords.add(word); sortedWords.put(lenght,thisLenghtwords); }else{ ArrayList thisLenghtwords = new ArrayList(); thisLenghtwords.add(word); sortedWords.put(lenght,thisLenghtwords); }    }
    public void addWord(String word)    {        words.add(word);    };