how to see if a string contains letters or strings in java