add length of last word.java