public static boolean isInt(final String str){
  try {
    Integer.parseInt(str);
    return true;
  }
 catch (  final NumberFormatException e) {
    return false;
  }
}

public static boolean isInt ( final String str ) { try { Integer . parseInt ( str ) ; return true ; } catch ( final NumberFormatException e ) { return false ; } }
checks if is int .
