Sort the elements in the length of the word for Java7.