[java] What is the best way to extract the first word from a string in Java?