public static boolean isNumber(String s){
  if (s.length() == 0) {
    return false;
  }
  for (  char c : s.toCharArray()) {
    if (!Character.isDigit(c)) {
      return false;
    }
  }
  return true;
}

public static boolean isNumber ( String s ) { if ( s . length ( ) == 0 ) { return false ; } for ( char c : s . toCharArray ( ) ) { if ( ! Character . isDigit ( c ) ) { return false ; } } return true ; }
check if this string is a decimal number .
