Length of Last Word in Java