[java] How to check if a string is numeric?