code: public static boolean isNumeric(String string) {
          if (string == null || string.length() == 0)
              return false;
  
          int l = string.length();
          for (int i = 0; i < l; i++) {
              if (!Character.isDigit(string.codePointAt(i)))
                  return false;
          }
          return true;
      }
docs: Tests if a string is numeric, i.e. contains only digit characters
  @param string string to test
  @return true if only digit chars, false if empty or null or contains non-digit chars