[java] Splitting words into letters in Java